From: Nicolas Boisselier Date: Thu, 10 Oct 2024 08:13:43 +0000 (+0200) Subject: bin/nb-repo-update X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=c9d8c82a330f11fb5e32450232d2c3c06f4e8e59;p=nb.git bin/nb-repo-update --- diff --git a/bin/nb-repo-update b/bin/nb-repo-update index 669bb280..8e561699 100755 --- a/bin/nb-repo-update +++ b/bin/nb-repo-update @@ -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 diff --git a/bin/nb-update b/bin/nb-update index 3d4809ed..ad306f85 100755 --- a/bin/nb-update +++ b/bin/nb-update @@ -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