From 6052b9d20b04d133a23900c94b2b2c896875a47f Mon Sep 17 00:00:00 2001 From: UMTS at Teleco Date: Mon, 22 Dec 2025 11:33:57 +0100 Subject: great --- beepzone-helper.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'beepzone-helper.sh') diff --git a/beepzone-helper.sh b/beepzone-helper.sh index f8d1e59..f7b9ccb 100755 --- a/beepzone-helper.sh +++ b/beepzone-helper.sh @@ -110,8 +110,9 @@ ask_main_menu() { 3 "Manage users & roles" \ 4 "Configure & setup SeckelAPI" \ 5 "Build desktop client" \ - 6 "Clean sources" \ - 7 "Quit" 2>"$CHOICE_FILE" + 6 "Update from git masters" \ + 7 "Clean sources" \ + 8 "Quit" 2>"$CHOICE_FILE" choice=$(<"$CHOICE_FILE") case $choice in @@ -120,8 +121,9 @@ ask_main_menu() { 3) manage_users_and_roles ;; 4) setup_seckelapi ;; 5) build_desktop_client ;; - 6) clean_sources ;; - 7) exit 0 ;; + 6) update_from_git_masters ;; + 7) clean_sources ;; + 8) exit 0 ;; esac done } @@ -690,6 +692,46 @@ setup_seckelapi() { fi } +update_from_git_masters() { + local seckelapi_sources="$WORK_DIR/backend/seckelapi/sources" + local client_sources="$WORK_DIR/frontend/desktop-client/sources" + + if $DIALOG --yesno "This will run 'git pull' in both backend and frontend source directories.\n\nContinue?" 10 60; then + clear + echo "Updating sources from git masters..." + echo "====================================" + echo "" + + # Update SeckelAPI + if [[ -d "$seckelapi_sources/.git" ]]; then + echo "Updating SeckelAPI..." + if (cd "$seckelapi_sources" && git pull); then + echo "SeckelAPI updated successfully." + else + echo "Failed to update SeckelAPI." + fi + else + echo "SeckelAPI sources not found or not a git repository. Skipping." + fi + echo "" + + # Update Desktop Client + if [[ -d "$client_sources/.git" ]]; then + echo "Updating Desktop Client..." + if (cd "$client_sources" && git pull); then + echo "Desktop Client updated successfully." + else + echo "Failed to update Desktop Client." + fi + else + echo "Desktop Client sources not found or not a git repository. Skipping." + fi + + echo "" + read -p "Press Enter to continue..." + fi +} + clean_sources() { $DIALOG --yesno "This will delete all sources directories including hidden files:\n\n- backend/seckelapi/sources\n- frontend/desktop-client/sources\n\nAre you sure?" 12 70 || return -- cgit v1.2.3-70-g09d2