added git version checking to all scripts

This commit is contained in:
tb14
2025-01-27 16:00:22 -06:00
parent a3150b19fe
commit 8aa29e0616
8 changed files with 121 additions and 16 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/bash
################################################################################
################################################################################
######################## AmRRON Setup Script v1.0.2 ########################
######################## AmRRON Setup Script v1.1 ########################
######################## Created by TB-14 ########################
######################## 26 JAN 2025 ########################
################################################################################
@@ -83,17 +83,17 @@ function check_for_updates() {
echo -e ${ACTION}Checking Git repo
echo -e =======================${NOCOLOR}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH" != "testing" ]
if [ "$BRANCH" != "master" ]
then
echo -e ${ERROR}Not on testing. Aborting. ${NOCOLOR}
echo -e ${ERROR}Not on master. Aborting. ${NOCOLOR}
echo
exit 0
fi
git fetch
HEADHASH=$(git rev-parse HEAD > /dev/null)
UPSTREAMHASH=$(git rev-parse testing@{upstream} > /dev/null)
HEADHASH=$(git rev-parse HEAD)
UPSTREAMHASH=$(git rev-parse master@{upstream})
if [ "$HEADHASH" != "$UPSTREAMHASH" ]
then