]> git.nbdom.net Git - nb.git/commitdiff
bin/nb-repo-update
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 10 Oct 2024 08:13:43 +0000 (10:13 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 10 Oct 2024 08:13:43 +0000 (10:13 +0200)
bin/nb-repo-update
bin/nb-update

index 669bb28018f156cfee90ded9604a3b7e08d3610d..8e5616993fef7d6556b40c128605a054d5a5f1eb 100755 (executable)
@@ -110,7 +110,9 @@ fi
 #git_conn_check || exit
 
 echo ">Pull $REPO_NAME branch=$REPO_BRANCH user=$(whoami) path=$REPO_ROOT"
+
 git pull >&$F_INDENT1 || exit
+
 if [ "$CLEANUP" = "1" ]
 then
        echo "  >git gc cleanup"
@@ -140,4 +142,4 @@ fi
 # git status
 #
 echo "  >git status"
-git status --short
+git status --short >&$F_INDENT2
index 3d4809ed6e5d4a7149e4747ae12db592fe68d899..ad306f85044f15b1c198ec41eb89940bfa9efd19 100755 (executable)
@@ -60,6 +60,7 @@ while [ $# -gt 0 ]; do
                --verbose|-v) VERBOSE=$(($VERBOSE+1)) ;;
                --debug|-debug|-d) DEBUG=$(($DEBUG+1)) ;;
 
+               -*) echo "Unknow option: $1 at $0!"; exit -1; ;;
                *) REPO_NAME_FILTER="$REPO_NAME_FILTER $1" ;;
 
        esac
@@ -249,7 +250,6 @@ fi # PULL
 
        if [ "$POST_INFO" = "1" ]
        then
-               echo
                echo "  >Post repo infos"
                (
                        nb_api_post_host_info "$preff.name" "$name"
@@ -259,7 +259,6 @@ fi # PULL
                        nb_api_post_host_info "$preff.exit_code" "$ex_repo"
                ) 2>/dev/null | sed -E -e 's/^/    /; s/'$'\t''/: /'
        fi
-       echo
 
 done
 
@@ -291,7 +290,6 @@ then
                nb_api_post_hosts_infos | tee /run/nb/sys.csv.tmp | sed -e 's/^/  /; s/'$'\t''/: /'
                [ -e /run/nb/sys.csv.tmp ] && sed -e 's/^sys\.//' /run/nb/sys.csv.tmp > /run/nb/sys.csv
                rm -f /run/nb/sys.csv.tmp
-               echo
        fi
 fi
 
@@ -299,6 +297,7 @@ fi
 # End
 #
 rm -f "$TMP"
+echo
 if [ "$ex" = "0" ]; then
        printf ">OK\n"
 else