Skip to content

Instantly share code, notes, and snippets.

@pfrenssen
Created April 18, 2019 21:10
Show Gist options
  • Save pfrenssen/5e5d4165e7b0d724377f85faf2c6a4bc to your computer and use it in GitHub Desktop.
Save pfrenssen/5e5d4165e7b0d724377f85faf2c6a4bc to your computer and use it in GitHub Desktop.
#!/bin/bash -ex
./sync.sh
if [ ! -f sync.config ]; then
echo 'error: sync.config does not exist.'
exit 1
fi
. sync.config
cd $LOCAL_WEBROOT
git checkout master
if ! git ls-remote distribution --exit-code &> /dev/null ; then
git remote add distribution /home/pieter/v/distro
fi
git fetch distribution
git merge distribution/pocomas --no-edit
git push
ssh $SSH_USER@$SSH_SERVER "./update.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment