This commit is contained in:
kjeld Schouten-Lebbing 2020-05-24 23:00:59 +02:00
parent 29c0e13eb7
commit 9483212dba
2 changed files with 5 additions and 4 deletions

View File

@ -24,10 +24,11 @@ parse_yaml() {
# automatic update function
gitupdate() {
git remote add upstream https://github.com/jailmanager/jailman.git > /dev/null 2>&1
echo "checking for updates using Branch: $1"
git fetch
git fetch upstream
git update-index -q --refresh
CHANGED=$(git diff --name-only origin/"$1")
CHANGED=$(git diff --name-only "$1")
if [ -n "$CHANGED" ];
then
echo "script requires update"

View File

@ -20,7 +20,7 @@ if ! [ "$(id -u)" = 0 ]; then
fi
# Auto Update
BRANCH="master"
BRANCH="upstream/master"
gitupdate ${BRANCH}
# If no option is given, point to the help menu