add sync script for runa git repo

This commit is contained in:
Nico Schottelius 2023-10-19 19:22:53 +02:00
parent 9c3df7e1db
commit 2f9c9e43de
1 changed files with 20 additions and 0 deletions

20
bin/sync-to-runa.sh Executable file
View File

@ -0,0 +1,20 @@
#!/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