Update run.sh
This commit is contained in:
18
run.sh
18
run.sh
@@ -31,9 +31,11 @@ if [ "${1}" == "update" ]; then
|
|||||||
fi
|
fi
|
||||||
cd /opt/idssys/defaults
|
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 [ "${2}" != "qq" ]; then
|
if [ "${2}" != "q" ]; then
|
||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
echo -e "\e[0K\r ${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
git fetch origin master >/dev/null 2>&1
|
git fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard origin/master >/dev/null 2>&1
|
git reset --hard origin/master >/dev/null 2>&1
|
||||||
@@ -46,9 +48,11 @@ if [ "${1}" == "update" ]; then
|
|||||||
|
|
||||||
cd ${MMFOLDER}
|
cd ${MMFOLDER}
|
||||||
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 [ "${2}" != "qq" ]; then
|
if [ "${2}" != "q" ]; then
|
||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
echo -e "\e[0K\r ${idsCL[LightCyan]}Installing mediamanager updates...${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[LightCyan]}Installing mediamanager updates...${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[LightCyan]}Installing mediamanager updates...${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
git fetch origin master >/dev/null 2>&1
|
git fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard origin/master >/dev/null 2>&1
|
git reset --hard origin/master >/dev/null 2>&1
|
||||||
@@ -58,14 +62,18 @@ if [ "${1}" == "update" ]; then
|
|||||||
git pull >/dev/null 2>&1
|
git pull >/dev/null 2>&1
|
||||||
git submodule update --remote >/dev/null 2>&1
|
git submodule update --remote >/dev/null 2>&1
|
||||||
/bin/chmod +x ${MMFOLDER}/mm-scripts.sh 2>&1
|
/bin/chmod +x ${MMFOLDER}/mm-scripts.sh 2>&1
|
||||||
if [ "${2}" != "qq" ]; then
|
|
||||||
echo -en "\e[1A";
|
|
||||||
source /opt/idssys/mediamanager/defaults.inc
|
source /opt/idssys/mediamanager/defaults.inc
|
||||||
|
if [ "${2}" != "q" ]; then
|
||||||
|
echo -en "\e[1A";
|
||||||
echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[Green]}Update to v${VERS} complete${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
elif [ "${2}" != "qq" ]; then
|
elif [ "${2}" != "q" ]; then
|
||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
echo -e "\e[0K\r ${idsCL[LightCyan]}No Updates Available${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[LightCyan]}No Updates Available${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[LightCyan]}No Updates Available${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
/bin/rm -f ${MMFOLDER}/update.available
|
/bin/rm -f ${MMFOLDER}/update.available
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user