Created
January 10, 2019 22:08
-
-
Save JoelLisenby/d5f0334d95ba3920573c18d010d2d5a1 to your computer and use it in GitHub Desktop.
Bash script to set up a new project folder for wpengine when using vscode with the sftp extension
This file contains 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 characters
#!/bin/bash | |
echo -e "Domain: \c " | |
read domain | |
echo -e "Slug: \c " | |
read slug | |
echo -e "Password: \c " | |
read password | |
dir="$domain/ftp/public/.vscode" | |
mkdir -p $dir | |
cd $dir | |
cat << EOF > sftp.json | |
{ | |
"protocol": "sftp", | |
"host": "$slug.sftp.wpengine.com", | |
"port": 2222, | |
"username": "$slug", | |
"remotePath": "/", | |
"password": "$password", | |
"ignore": [ | |
".vscode", | |
".git", | |
".DS_Store" | |
] | |
} | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment