Merge pull request #119 from Ornias1993/fix_master

devnull all the things, we do our own messages
This commit is contained in:
Kjeld Schouten-Lebbing 2020-05-24 23:17:42 +02:00 committed by GitHub
commit dd31b4d094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,15 +26,15 @@ parse_yaml() {
gitupdate() { gitupdate() {
git remote add upstream https://github.com/jailmanager/jailman.git > /dev/null 2>&1 git remote add upstream https://github.com/jailmanager/jailman.git > /dev/null 2>&1
echo "checking for updates using Branch: $1" echo "checking for updates using Branch: $1"
git fetch upstream git fetch upstream > /dev/null 2>&1
git update-index -q --refresh git update-index -q --refresh > /dev/null 2>&1
CHANGED=$(git diff --name-only "$1") CHANGED=$(git diff --name-only "$1")
if [ -n "$CHANGED" ]; if [ -n "$CHANGED" ];
then then
echo "script requires update" echo "script requires update"
git reset --hard git reset --hard > /dev/null 2>&1
git checkout "${1}" git checkout "${1}" > /dev/null 2>&1
git pull git pull > /dev/null 2>&1
echo "script updated, please restart the script manually" echo "script updated, please restart the script manually"
exit 1 exit 1
else else