matrix-docker-compose/bin/sync-to-runa.sh

21 lines
364 B
Bash
Raw Normal View History

2023-10-19 17:22:53 +00:00
#!/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