diff --git a/Scripts/cd-autostart.ps1 b/Scripts/cd-autostart.ps1 index e6de2f65..c9a149a3 100755 --- a/Scripts/cd-autostart.ps1 +++ b/Scripts/cd-autostart.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's autostart folder. .EXAMPLE PS> ./cd-autostart - 📂C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup + 📂C:\Users\Joe\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Autostart folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup" + if (-not(test-path "$Path" -pathType container)) { + throw "Autostart folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-desktop.ps1 b/Scripts/cd-desktop.ps1 index 6344c9b4..2f16aa75 100755 --- a/Scripts/cd-desktop.ps1 +++ b/Scripts/cd-desktop.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's desktop folder. .EXAMPLE PS> ./cd-desktop - 📂/home/markus/Desktop + 📂/home/Joe/Desktop .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,16 @@ #> try { - $TargetDir = resolve-path "$HOME/Desktop" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Desktop folder at 📂$TargetDir doesn't exist (yet)" + if ($IsLinux) { + $Path = resolve-path "$HOME/Desktop" + } else { + $Path = [Environment]::GetFolderPath('DesktopDirectory') } - set-location "$TargetDir" - "📂$TargetDir" + if (-not(Test-Path "$Path" -pathType container)) { + throw "Desktop folder at 📂$Path doesn't exist (yet)" + } + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-docs.ps1 b/Scripts/cd-docs.ps1 index 57970014..5e81a98a 100755 --- a/Scripts/cd-docs.ps1 +++ b/Scripts/cd-docs.ps1 @@ -14,15 +14,15 @@ try { if ($IsLinux) { - $DocsFolder = Resolve-Path "$HOME/Documents" + $Path = Resolve-Path "$HOME/Documents" } else { - $DocsFolder = [Environment]::GetFolderPath('MyDocuments') + $Path = [Environment]::GetFolderPath('MyDocuments') } - if (-not(Test-Path "$DocsFolder" -pathType container)) { - throw "Documents folder at 📂$DocsFolder doesn't exist (yet)" + if (-not(Test-Path "$Path" -pathType container)) { + throw "Documents folder at 📂$Path doesn't exist (yet)" } - set-location "$DocsFolder" - "📂$DocsFolder" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-downloads.ps1 b/Scripts/cd-downloads.ps1 index 0343d063..ae1b83c2 100755 --- a/Scripts/cd-downloads.ps1 +++ b/Scripts/cd-downloads.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's downloads folder. .EXAMPLE PS> ./cd-downloads - 📂/home/markus/Downloads + 📂/home/Joe/Downloads .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/Downloads" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Downloads folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/Downloads" + if (-not(test-path "$Path" -pathType container)) { + throw "Downloads folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-dropbox.ps1 b/Scripts/cd-dropbox.ps1 index 29b516c0..a2c1b1ed 100755 --- a/Scripts/cd-dropbox.ps1 +++ b/Scripts/cd-dropbox.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's Dropbox folder. .EXAMPLE PS> ./cd-dropbox - 📂/home/markus/Dropbox + 📂/home/Joe/Dropbox .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/Dropbox" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Dropbox folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/Dropbox" + if (-not(test-path "$Path" -pathType container)) { + throw "Dropbox folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-fonts.ps1 b/Scripts/cd-fonts.ps1 new file mode 100755 index 00000000..6dc639f7 --- /dev/null +++ b/Scripts/cd-fonts.ps1 @@ -0,0 +1,25 @@ +<# +.SYNOPSIS + Sets the working directory to the fonts folder +.DESCRIPTION + This PowerShell script changes the working directory to the fonts folder. +.EXAMPLE + PS> ./cd-fonts +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz / License: CC0 +#> + +try { + $Path = [Environment]::GetFolderPath('Fonts') + if (-not(Test-Path "$Path" -pathType container)) { + throw "Fonts folder at 📂$Path doesn't exist (yet)" + } + set-location "$Path" + "📂$Path" + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" + exit 1 +} diff --git a/Scripts/cd-home.ps1 b/Scripts/cd-home.ps1 index 7aed2ed7..959e20a7 100755 --- a/Scripts/cd-home.ps1 +++ b/Scripts/cd-home.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's home directory. .EXAMPLE PS> ./cd-home - 📂/home/markus + 📂/home/Joe .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Home directory at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME" + if (-not(test-path "$Path" -pathType container)) { + throw "Home directory at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-music.ps1 b/Scripts/cd-music.ps1 index 51ca4f0b..d05c0394 100755 --- a/Scripts/cd-music.ps1 +++ b/Scripts/cd-music.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's music folder. .EXAMPLE PS> ./cd-music - 📂/home/markus/Music + 📂/home/Joe/Music .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,16 @@ #> try { - $TargetDir = resolve-path "$HOME/Music" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Music folder at 📂$TargetDir doesn't exist (yet)" + if ($IsLinux) { + $Path = Resolve-Path "$HOME/Music" + } else { + $Path = [Environment]::GetFolderPath('MyMusic') } - set-location "$TargetDir" - "📂$TargetDir" + if (-not(Test-Path "$Path" -pathType container)) { + throw "Music folder at 📂$Path doesn't exist (yet)" + } + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-onedrive.ps1 b/Scripts/cd-onedrive.ps1 index b16a4d27..2e8ba836 100644 --- a/Scripts/cd-onedrive.ps1 +++ b/Scripts/cd-onedrive.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's OneDrive folder. .EXAMPLE PS> ./cd-onedrive - 📂/home/markus/OneDrive + 📂/home/Joe/OneDrive .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/OneDrive" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "OneDrive folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/OneDrive" + if (-not(test-path "$Path" -pathType container)) { + throw "OneDrive folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-pics.ps1 b/Scripts/cd-pics.ps1 index 75a8a7ca..ee3715ed 100755 --- a/Scripts/cd-pics.ps1 +++ b/Scripts/cd-pics.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's pictures folder. .EXAMPLE PS> ./cd-pics - 📂/home/markus/Pictures + 📂/home/Joe/Pictures .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,16 @@ #> try { - $TargetDir = resolve-path "$HOME/Pictures" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Pictures folder at 📂$TargetDir doesn't exist (yet)" + if ($IsLinux) { + $Path = Resolve-Path "$HOME/Pictures" + } else { + $Path = [Environment]::GetFolderPath('MyPictures') } - set-location "$TargetDir" - "📂$TargetDir" + if (-not(Test-Path "$Path" -pathType container)) { + throw "Pictures folder at 📂$Path doesn't exist (yet)" + } + Set-Location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-recycle-bin.ps1 b/Scripts/cd-recycle-bin.ps1 index 7159e7d1..1fe9c331 100644 --- a/Scripts/cd-recycle-bin.ps1 +++ b/Scripts/cd-recycle-bin.ps1 @@ -19,12 +19,12 @@ function Get-CurrentUserSID { [CmdletBinding()] param() try { - $TargetDir = 'C:\$Recycle.Bin\' + "$(Get-CurrentUserSID)" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Recycle bin folder at 📂$TargetDir doesn't exist (yet)" + $Path = 'C:\$Recycle.Bin\' + "$(Get-CurrentUserSID)" + if (-not(test-path "$Path" -pathType container)) { + throw "Recycle bin folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-repos.ps1 b/Scripts/cd-repos.ps1 index 46f47219..46e6c611 100644 --- a/Scripts/cd-repos.ps1 +++ b/Scripts/cd-repos.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's Git repositories folder. .EXAMPLE PS> ./cd-repos - 📂/home/markus/Repos + 📂/home/Joe/Repos .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/Repos" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Git repositories folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/Repos" + if (-not(test-path "$Path" -pathType container)) { + throw "Git repositories folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-root.ps1 b/Scripts/cd-root.ps1 index 365c0bcf..58355d19 100755 --- a/Scripts/cd-root.ps1 +++ b/Scripts/cd-root.ps1 @@ -14,15 +14,15 @@ try { if ($IsLinux) { - $TargetDir = resolve-path "/" + $Path = resolve-path "/" } else { - $TargetDir = resolve-path "C:\" + $Path = resolve-path "C:\" } - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Root directory at 📂$TargetDir doesn't exist (yet)" + if (-not(test-path "$Path" -pathType container)) { + throw "Root directory at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-scripts.ps1 b/Scripts/cd-scripts.ps1 index 69f04b45..b079d3b1 100755 --- a/Scripts/cd-scripts.ps1 +++ b/Scripts/cd-scripts.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the PowerShell scripts folder. .EXAMPLE PS> ./cd-scripts - 📂/home/markus/PowerShell/Scripts + 📂/home/Joe/PowerShell/Scripts .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$PSScriptRoot" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "PowerShell scripts folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$PSScriptRoot" + if (-not(test-path "$Path" -pathType container)) { + throw "PowerShell scripts folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-ssh.ps1 b/Scripts/cd-ssh.ps1 index 0f503fc6..b2ee160f 100755 --- a/Scripts/cd-ssh.ps1 +++ b/Scripts/cd-ssh.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's SSH folder. .EXAMPLE PS> ./cd-ssh - 📂/home/markus/.ssh + 📂/home/Joe/.ssh .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$HOME/.ssh" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "SSH folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "$HOME/.ssh" + if (-not(test-path "$Path" -pathType container)) { + throw "SSH folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-temp.ps1 b/Scripts/cd-temp.ps1 index 5179bf57..584102fa 100644 --- a/Scripts/cd-temp.ps1 +++ b/Scripts/cd-temp.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the temporary folder. .EXAMPLE PS> ./cd-temp - 📂C:\Users\markus\AppData\Local\Temp + 📂C:\Users\Joe\AppData\Local\Temp .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -18,12 +18,12 @@ function GetTempDir { } try { - $TargetDir = resolve-path GetTempDir - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Temporary folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path GetTempDir + if (-not(test-path "$Path" -pathType container)) { + throw "Temporary folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-up.ps1 b/Scripts/cd-up.ps1 index e35617d2..6daa5b0f 100755 --- a/Scripts/cd-up.ps1 +++ b/Scripts/cd-up.ps1 @@ -12,12 +12,12 @@ #> try { - $TargetDir = resolve-path ".." - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path ".." + if (-not(test-path "$Path" -pathType container)) { + throw "Folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-up2.ps1 b/Scripts/cd-up2.ps1 index 311e0bed..9b3cc77f 100644 --- a/Scripts/cd-up2.ps1 +++ b/Scripts/cd-up2.ps1 @@ -12,12 +12,12 @@ #> try { - $TargetDir = resolve-path "../.." - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "../.." + if (-not(test-path "$Path" -pathType container)) { + throw "Folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-up3.ps1 b/Scripts/cd-up3.ps1 index dfd0f859..8ad721e8 100644 --- a/Scripts/cd-up3.ps1 +++ b/Scripts/cd-up3.ps1 @@ -12,12 +12,12 @@ #> try { - $TargetDir = resolve-path "../../.." - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "../../.." + if (-not(test-path "$Path" -pathType container)) { + throw "Folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-up4.ps1 b/Scripts/cd-up4.ps1 index 24557dd5..d7ce0d15 100644 --- a/Scripts/cd-up4.ps1 +++ b/Scripts/cd-up4.ps1 @@ -12,12 +12,12 @@ #> try { - $TargetDir = resolve-path "../../../.." - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Folder at 📂$TargetDir doesn't exist (yet)" + $Path = resolve-path "../../../.." + if (-not(test-path "$Path" -pathType container)) { + throw "Folder at 📂$Path doesn't exist (yet)" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-videos.ps1 b/Scripts/cd-videos.ps1 index cb3cac50..7b305bac 100755 --- a/Scripts/cd-videos.ps1 +++ b/Scripts/cd-videos.ps1 @@ -5,7 +5,7 @@ This PowerShell script changes the working directory to the user's videos folder. .EXAMPLE PS> ./cd-videos - 📂/home/markus/Videos + 📂/home/Joe/Videos .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -13,12 +13,16 @@ #> try { - $TargetDir = resolve-path "$HOME/Videos" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Videos folder at 📂$TargetDir doesn't exist (yet)" + if ($IsLinux) { + $Path = Resolve-Path "$HOME/Videos" + } else { + $Path = [Environment]::GetFolderPath('MyVideos') } - set-location "$TargetDir" - "📂$TargetDir" + if (-not(Test-Path "$Path" -pathType container)) { + throw "Videos folder at 📂$Path doesn't exist (yet)" + } + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/cd-windows.ps1 b/Scripts/cd-windows.ps1 index c5b1387e..633877d1 100644 --- a/Scripts/cd-windows.ps1 +++ b/Scripts/cd-windows.ps1 @@ -13,12 +13,12 @@ #> try { - $TargetDir = resolve-path "$env:WINDIR" - if (-not(test-path "$TargetDir" -pathType container)) { - throw "Windows directory at 📂$TargetDir doesn't exist" + $Path = resolve-path "$env:WINDIR" + if (-not(test-path "$Path" -pathType container)) { + throw "Windows directory at 📂$Path doesn't exist" } - set-location "$TargetDir" - "📂$TargetDir" + set-location "$Path" + "📂$Path" exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/start-ipfs-server.ps1 b/Scripts/start-ipfs-server.ps1 index c16892ef..11c15c93 100755 --- a/Scripts/start-ipfs-server.ps1 +++ b/Scripts/start-ipfs-server.ps1 @@ -29,7 +29,7 @@ try { if ($lastExitCode -ne "0") { throw "'ipfs config Addresses.Gateway' failed" } $Hostname = $(hostname) - & ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"http://miami:5001\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\"]' + & ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '[\"http://paris:5001\", \"http://localhost:3000\", \"http://127.0.0.1:5001\", \"https://webui.ipfs.io\"]' if ($lastExitCode -ne "0") { throw "'ipfs config Access-Control-Allow-Origin' failed" } & ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '[\"PUT\", \"POST\"]'