update
This commit is contained in:
18
run.sh
18
run.sh
@@ -14,7 +14,11 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
|
||||
|
||||
if [ "${1}" != "runup" ]; then
|
||||
cd /opt/idssys/defaults
|
||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||
if [ "${1}" != "runup" ]; then
|
||||
echo -en "\e[1A";
|
||||
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
||||
fi
|
||||
git fetch origin master >/dev/null 2>&1
|
||||
git reset --hard origin/master >/dev/null 2>&1
|
||||
git reflog expire --expire=now --all >/dev/null 2>&1
|
||||
@@ -29,13 +33,23 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
|
||||
cd /opt/idssys/linupx
|
||||
fi
|
||||
if [ "$1" != "update" ] && [ "$1" != "up" ]; then
|
||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
|
||||
if [ "${1}" != "runup" ]; then
|
||||
echo -en "\e[1A";
|
||||
echo -e "\e[0K\r ${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}"
|
||||
fi
|
||||
git fetch origin master >/dev/null 2>&1
|
||||
git reset --hard origin/master >/dev/null 2>&1
|
||||
git reflog expire --expire=now --all >/dev/null 2>&1
|
||||
git repack -ad >/dev/null 2>&1
|
||||
git prune >/dev/null 2>&1
|
||||
git pull >/dev/null 2>&1
|
||||
|
||||
if [ "${1}" != "runup" ]; then
|
||||
|
||||
echo -en "\e[1A";
|
||||
echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "${1}" != "runup" ]; then
|
||||
|
||||
Reference in New Issue
Block a user