gitfix
This commit is contained in:
parent
29c0e13eb7
commit
9483212dba
@ -24,10 +24,11 @@ parse_yaml() {
|
|||||||
|
|
||||||
# automatic update function
|
# automatic update function
|
||||||
gitupdate() {
|
gitupdate() {
|
||||||
|
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
|
git fetch upstream
|
||||||
git update-index -q --refresh
|
git update-index -q --refresh
|
||||||
CHANGED=$(git diff --name-only origin/"$1")
|
CHANGED=$(git diff --name-only "$1")
|
||||||
if [ -n "$CHANGED" ];
|
if [ -n "$CHANGED" ];
|
||||||
then
|
then
|
||||||
echo "script requires update"
|
echo "script requires update"
|
||||||
|
@ -20,7 +20,7 @@ if ! [ "$(id -u)" = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Auto Update
|
# Auto Update
|
||||||
BRANCH="master"
|
BRANCH="upstream/master"
|
||||||
gitupdate ${BRANCH}
|
gitupdate ${BRANCH}
|
||||||
|
|
||||||
# If no option is given, point to the help menu
|
# If no option is given, point to the help menu
|
||||||
|
Loading…
Reference in New Issue
Block a user