Skip to content

Instantly share code, notes, and snippets.

@JoelLisenby
Created January 10, 2019 22:08
Show Gist options
  • Save JoelLisenby/d5f0334d95ba3920573c18d010d2d5a1 to your computer and use it in GitHub Desktop.
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
#!/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