#!/bin/sh if [ ! -d ansible -o ! -f bin/sync-to-runa.sh ]; then echo "Need to run from project root" exit 1 fi if [ $# -lt 2 ]; then echo $0 runa-git-repo git-commit-message exit 1 fi dest=$1; shift rsync -avn --delete ansible $dest read -p "All good?" rsync -av --delete ansible $dest cd $dest && git add . && git commit -m "$@" && git push