#1138 clean repo on change

This commit is contained in:
rootzoll 2020-04-26 22:01:56 +02:00
parent bb9ab81e29
commit de547fcbf5

View File

@ -142,12 +142,14 @@ patch()
;;
REPO)
clear
echo "..."
newGitHubUser=$(whiptail --inputbox "\nPlease enter the GitHub USERNAME of the forked RaspiBlitz Repo?" 10 38 ${activeGitHubUser} --title "Change Sync Repo" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
newGitHubUser=$(echo "${newGitHubUser}" | cut -d " " -f1)
echo "--> " ${newGitHubUser}
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${activeBranch} ${newGitHubUser})
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh -clean ${activeBranch} ${newGitHubUser})
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30
fi
@ -159,11 +161,13 @@ patch()
;;
BRANCH)
clear
echo "..."
newGitHubBranch=$(whiptail --inputbox "\nPlease enter the GitHub BRANCH of the RaspiBlitz Repo '${activeGitHubUser}'?" 10 38 ${activeBranch} --title "Change Sync Branch" 3>&1 1>&2 2>&3)
exitstatus=$?
if [ $exitstatus = 0 ]; then
newGitHubBranch=$(echo "${newGitHubBranch}" | cut -d " " -f1)
echo "--> " $newGitHubBranch
error=""
source <(sudo -u admin /home/admin/XXsyncScripts.sh ${newGitHubBranch})
if [ ${#error} -gt 0 ]; then
whiptail --title "ERROR" --msgbox "${error}" 8 30