diff --git a/util/publish.sh b/util/publish.sh index 45c4113e3..7c02f6d8d 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