diff --git a/AmRRON-PAT-GUI.sh b/AmRRON-PAT-GUI.sh index 1c2fb03..21fd761 100755 --- a/AmRRON-PAT-GUI.sh +++ b/AmRRON-PAT-GUI.sh @@ -1,12 +1,45 @@ #!/bin/bash ################################################################################ ################################################################################ - ################# AmRRON PAT Setup and Alias Manager v1.0 ################## + ################# AmRRON PAT Setup and Alias Manager v1.1 ################## ################# Created by TB-14 ################## - ################# 26 JAN 25 ################## + ################# 27 JAN 25 ################## ################################################################################ ################################################################################ + function check_for_updates() { + ACTION='\033[1;90m' + FINISHED='\033[1;96m' + READY='\033[1;92m' + NOCOLOR='\033[0m' # No Color + ERROR='\033[0;31m' + + echo + echo -e ${ACTION}Checking Git repo + echo -e =======================${NOCOLOR} + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$BRANCH" != "master" ] + then + echo -e ${ERROR}Not on master. Aborting. ${NOCOLOR} + echo + exit 0 + fi + + + git fetch + HEADHASH=$(git rev-parse HEAD) + UPSTREAMHASH=$(git rev-parse master@{upstream}) + + if [ "$HEADHASH" != "$UPSTREAMHASH" ] + then + echo -e ${ERROR}You are not running the most current version of these scripts. Aborting.${NOCOLOR} + echo -e ${ERROR}Please run "git pull" from the setup-scripts directory to receive updates.${NOCOLOR} + exit 0 + else + echo -e ${FINISHED}Current branch is up to date with origin/master.${NOCOLOR} + fi + } + function set_screen_size() { screen_size=$(xdpyinfo | grep dimensions | \ @@ -487,9 +520,9 @@ fi - +check_for_updates set_screen_size -check_repo_version +#check_repo_version dep_check getardoptools_install skip_setup diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index c08fc39..8989b1c 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -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 diff --git a/AmRRON-TriMode-Setup.sh b/AmRRON-TriMode-Setup.sh index c9ed5cb..1021fd4 100755 --- a/AmRRON-TriMode-Setup.sh +++ b/AmRRON-TriMode-Setup.sh @@ -1,15 +1,47 @@ #!/bin/bash ################################################################################ ################################################################################ - ####################### AmRRON Tri-Mode Setup v0.7.2 ######################### + ####################### AmRRON Tri-Mode Setup v0.7.3 ######################### ####################### Created by TB-14 ######################### - ####################### 17 JAN 2025 ######################### + ####################### 27 JAN 2025 ######################### ################################################################################ ################################################################################ ### This script will perform basic setup for TriMode Operation. +function check_for_updates() { + ACTION='\033[1;90m' + FINISHED='\033[1;96m' + READY='\033[1;92m' + NOCOLOR='\033[0m' # No Color + ERROR='\033[0;31m' + + echo + echo -e ${ACTION}Checking Git repo + echo -e =======================${NOCOLOR} + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$BRANCH" != "master" ] + then + echo -e ${ERROR}Not on master. Aborting. ${NOCOLOR} + echo + exit 0 + fi + + + git fetch + HEADHASH=$(git rev-parse HEAD) + UPSTREAMHASH=$(git rev-parse master@{upstream}) + + if [ "$HEADHASH" != "$UPSTREAMHASH" ] + then + echo -e ${ERROR}You are not running the most current version of these scripts. Aborting.${NOCOLOR} + echo -e ${ERROR}Please run "git pull" from the setup-scripts directory to receive updates.${NOCOLOR} + exit 0 + else + echo -e ${FINISHED}Current branch is up to date with origin/master.${NOCOLOR} + fi +} function set_screen_size() { screen_size=$(xdpyinfo | grep dimensions | \ @@ -748,6 +780,7 @@ ardop_launcher } +check_for_updates set_screen_size check_repo_version determine_os diff --git a/AmRRON-Vara-setup.sh b/AmRRON-Vara-setup.sh index a073ad2..3b83e1a 100755 --- a/AmRRON-Vara-setup.sh +++ b/AmRRON-Vara-setup.sh @@ -1,9 +1,9 @@ #!/bin/bash ################################################################################ ################################################################################ - ####################### AmRRON Vara Setup v.0.9.4.1 ###################### + ####################### AmRRON Vara Setup v.1.0 ###################### ####################### Created by TB-14 ###################### - ####################### 18 JAN 2025 ###################### + ####################### 27 JAN 2025 ###################### ################################################################################ ################################################################################ @@ -34,6 +34,39 @@ sudo -v while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & fi +function check_for_updates() { + ACTION='\033[1;90m' + FINISHED='\033[1;96m' + READY='\033[1;92m' + NOCOLOR='\033[0m' # No Color + ERROR='\033[0;31m' + + echo + echo -e ${ACTION}Checking Git repo + echo -e =======================${NOCOLOR} + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [ "$BRANCH" != "master" ] + then + echo -e ${ERROR}Not on master. Aborting. ${NOCOLOR} + echo + exit 0 + fi + + + git fetch + HEADHASH=$(git rev-parse HEAD) + UPSTREAMHASH=$(git rev-parse master@{upstream}) + + if [ "$HEADHASH" != "$UPSTREAMHASH" ] + then + echo -e ${ERROR}You are not running the most current version of these scripts. Aborting.${NOCOLOR} + echo -e ${ERROR}Please run "git pull" from the setup-scripts directory to receive updates.${NOCOLOR} + exit 0 + else + echo -e ${FINISHED}Current branch is up to date with origin/master.${NOCOLOR} + fi +} + #### Program setup functions # Find out if we have yad and install if not echo "Yad is used to create the interactive menus this program uses." @@ -618,9 +651,9 @@ exit 1 - +check_for_updates set_screen_size -check_repo_version +#check_repo_version confirm_os primer_menu if [[ $PLAT = Linuxmint ]]; then diff --git a/changelogs/CHANGELOG-PAT-GUI.md b/changelogs/CHANGELOG-PAT-GUI.md index f681607..32a66c6 100644 --- a/changelogs/CHANGELOG-PAT-GUI.md +++ b/changelogs/CHANGELOG-PAT-GUI.md @@ -1,4 +1,6 @@ # PAT-GUI Changelog +# Version 1.1 +- Added git repo checking before the script runs instead of just a note. # Version 1.0 - Added option to select VARA or ARDOP stations for creating aliases. Fixed errors. # Version 0.8 diff --git a/changelogs/CHANGELOG-Setup-Script.md b/changelogs/CHANGELOG-Setup-Script.md index 96bba1f..15b80c4 100644 --- a/changelogs/CHANGELOG-Setup-Script.md +++ b/changelogs/CHANGELOG-Setup-Script.md @@ -1,4 +1,4 @@ -# Version 1.0.3 +# Version 1.1 - Added git repo checking before the script runs instead of just a note. # Version 1.0.2 - Updated FL Suite links as updates are no longer being sent to sourceforge. JS8Call now compiles with Hamlib 4.6.1. Hamlib 4.5.5 no longer default. Option left in menu for now. Added getvaralist / findvara commands for offline vara winlink station lists. diff --git a/changelogs/CHANGELOG-TriMode.md b/changelogs/CHANGELOG-TriMode.md index 3d57ddc..02934d4 100644 --- a/changelogs/CHANGELOG-TriMode.md +++ b/changelogs/CHANGELOG-TriMode.md @@ -1,4 +1,6 @@ # Tri-Mode Setup Changelog +# Version 0.7.3 +- Added git repo checking before the script runs instead of just a note. # Version 0.7.2 - added Mint 22.1 to the supported list # Version 0.7.1 diff --git a/changelogs/CHANGELOG-Vara-setup.md b/changelogs/CHANGELOG-Vara-setup.md index 03df017..364ee27 100644 --- a/changelogs/CHANGELOG-Vara-setup.md +++ b/changelogs/CHANGELOG-Vara-setup.md @@ -1,3 +1,5 @@ +# Version 1.0 +- Added git repo checking before the script runs instead of just a note. # Version 0.9.4.1 - Edited the note to reference com33. # Version 0.9.4