matrix-docker-compose/bin/sync-to-runa.sh
2023-10-19 19:22:53 +02:00

20 lines
364 B
Bash
Executable file

#!/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