1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/env bash # blogsend # folders localdir=~/web # update git echo "-- Updating git" cd $localdir || exit git add * git commit -m 'file update' git push origin master # update remote http root echo "-- Updating remote web root" ssh -q soc << EOF cd /srv/http/wittamore.fr || exit pwd git pull EOF printf "Done.\n" exit 0