diff --git a/home.admin/99updateMenu.sh b/home.admin/99updateMenu.sh index 296dddbae..a25c89f9c 100755 --- a/home.admin/99updateMenu.sh +++ b/home.admin/99updateMenu.sh @@ -127,7 +127,7 @@ patch() PR "Checkout a PullRequest to test" ) - CHOICE=$(whiptail --clear --title "GitHub-User: ${activeGitHubUser} Branch: ${activeBranch}" --menu "" 11 55 4 "${OPTIONS[@]}" 2>&1 >/dev/tty) + CHOICE=$(whiptail --clear --title " GitHub user:${activeGitHubUser} branch:${activeBranch} (${commitHashShort})" --menu "" 11 60 4 "${OPTIONS[@]}" 2>&1 >/dev/tty) clear case $CHOICE in diff --git a/home.admin/config.scripts/blitz.github.sh b/home.admin/config.scripts/blitz.github.sh index d3b65b3b3..971cd942f 100755 --- a/home.admin/config.scripts/blitz.github.sh +++ b/home.admin/config.scripts/blitz.github.sh @@ -10,22 +10,28 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then echo "FOR DEVELOPMENT USE ONLY!" echo "RaspiBlitz Sync Scripts" - echo "XXsyncScripts.sh info" - echo "XXsyncScripts.sh [-run|-clean|-install|-justinstall] branch [repo]" + echo "blitz.github.sh info" + echo "blitz.github.sh [-run|-clean|-install|-justinstall] branch [repo]" exit 1 fi -cd /home/admin/raspiblitz source /mnt/hdd/raspiblitz.conf 2>/dev/null +cd /home/admin/raspiblitz + # gather info activeGitHubUser=$(sudo -u admin cat /home/admin/raspiblitz/.git/config 2>/dev/null | grep "url = " | cut -d "=" -f2 | cut -d "/" -f4) activeBranch=$(git branch 2>/dev/null | grep \* | cut -d ' ' -f2) +commitHashLong=$(git log -n1 --format=format:"%H") +commitHashShort=${commitHashLong:0:7} # if parameter is "info" just give back basic info about sync if [ "$1" == "info" ]; then + echo "activeGitHubUser='${activeGitHubUser}'" echo "activeBranch='${activeBranch}'" + echo "commitHashLong='${commitHashLong}'" + echo "commitHashShort='${commitHashShort}'" exit 1 fi