Created
June 11, 2021 23:17
-
-
Save rvause/ba34b97fbb7274c1373a29ca91ac37f0 to your computer and use it in GitHub Desktop.
Revisions
-
rvause created this gist
Jun 11, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/usr/bin/env sh # Simple script to switch Neocities configs for the CLI. # Save tokens by copying "config" file to "config.<name>". # Then use <name> to switch to that config. # For example: # $ mv ~/.config/neocities/config ~/.config/neocities/config.mysite # # With that in place you can now switch to it: # $ neocities-switch mysite # # Repeat by logging in again and copying configs as many times you need # to set up configs to switch to. cp ~/.config/neocities/config.$1 ~/.config/neocities/config if neocities list / | grep index.html > /dev/null 2>&1; then echo "Switched to $1" else echo "Failed to authenticate $1" fi