diff options
| author | “Ryder <“r@okfoc.us”> | 2016-04-14 15:41:46 -0400 |
|---|---|---|
| committer | “Ryder <“r@okfoc.us”> | 2016-04-14 15:41:46 -0400 |
| commit | 1634d75ed8b731cb7c0f38e888e3968e7a634c73 (patch) | |
| tree | 91e0543356272997365b61e26ef00d6641860e2b /sync.sh | |
| parent | b278879fa77f3e1a1e1b4a31ac817252fea509ee (diff) | |
| parent | 822b2d509a0f689efb5ccf2ce378bfa249c9c194 (diff) | |
Merge branch 'master' of https://github.com/okfocus/portfolio
Diffstat (limited to 'sync.sh')
| -rwxr-xr-x | sync.sh | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +user=okfocus +server=portfolio.sup.land +dir=/home/okfocus/portfolio + +if [[ "$1" == push ]]; then + read -r -p "You're about to overwrite the remote db. Sure you wanna do that? [y/n] " response + if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then + echo Pushing db.json to $server... + scp db.json $user@$server:$dir + else + echo Aborting... + exit 0; + fi +elif [[ "$1" == pull ]]; then + echo Pulling db.json from $server... + scp $user@$server:$dir/db.json . +fi |
