Add syncgittree.sh.

This commit is contained in:
Ralph Bean 2015-09-25 17:41:05 +00:00
parent ee5b89f469
commit a1f55572bd
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#!/bin/bash
if [[ $UID != 0 ]]
then
echo "$0 must be run as root (sudo)"
exit 1
fi
echo
echo "Updating $1 into $2 for production"
echo
src="$1"
dest="$2"
if [ -d $dest/.git ]; then
cd $dest
/usr/bin/git pull 2>&1
else
/usr/bin/git clone $src $dest 2>&1 | sed 's/^/ /'
fi
echo

View file

@ -74,6 +74,15 @@
- batcave
- config
# Hook to republish our bare repos for web viewing.
- name: setup syncgittree.sh script
copy: src=syncgittree.sh dest=/usr/local/bin/syncgittree.sh mode=0755
tags:
- batcave
- config
#
# Script used to gather encrypted security questions from fas
#