From a8db3a4633d5a87c15e2edc36f1f4fa15a6231ca Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 25 Oct 2025 10:26:19 +0200 Subject: [PATCH] publish script: add progress --- util/publish.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/util/publish.sh b/util/publish.sh index 45c4113e3bd..7c02f6d8d87 100755 --- a/util/publish.sh +++ b/util/publish.sh @@ -53,7 +53,15 @@ TOTAL_ORDER=${TOTAL_ORDER#ROOT} CRATE_VERSION=$(grep '^version =' Cargo.toml | head -n1 | cut -d '"' -f2) set -e -for dir in src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/; do +CORE_DIRS="src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uutests/ fuzz/uufuzz/" +CORE_COUNT=$(echo $CORE_DIRS | wc -w) +UTIL_COUNT=$(echo $TOTAL_ORDER | wc -w) +TOTAL_COUNT=$((CORE_COUNT + UTIL_COUNT + 1)) +CURRENT=0 + +for dir in $CORE_DIRS; do + CURRENT=$((CURRENT + 1)) + echo "[$CURRENT/$TOTAL_COUNT] Processing: $dir" ( cd "$dir" CRATE_NAME=$(grep '^name =' "Cargo.toml" | head -n1 | cut -d '"' -f2) @@ -68,6 +76,8 @@ for dir in src/uucore_procs/ src/uucore/ src/uu/stdbuf/src/libstdbuf/ tests/uute done for p in $TOTAL_ORDER; do + CURRENT=$((CURRENT + 1)) + echo "[$CURRENT/$TOTAL_COUNT] Processing: $p" ( cd "src/uu/$p" CRATE_NAME=$(grep '^name =' "Cargo.toml" | head -n1 | cut -d '"' -f2) @@ -80,5 +90,7 @@ for p in $TOTAL_ORDER; do ) done +CURRENT=$((CURRENT + 1)) +echo "[$CURRENT/$TOTAL_COUNT] Processing: main coreutils crate" #shellcheck disable=SC2086 cargo publish $ARG