mirror of
https://gitlab.com/amrron/setup-scripts.git
synced 2026-10-17 01:54:00 -04:00
added git version checking to all scripts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user