From b8bbfb6a5bc9cb2b89d16ce67c3399496f5fbb07 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 12 Feb 2022 00:15:04 +0000 Subject: using hbar to create loading bar --- xibuild/build_all.sh | 2 +- xibuild/make_infos.sh | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'xibuild') diff --git a/xibuild/build_all.sh b/xibuild/build_all.sh index 0faeb53..cf99f05 100755 --- a/xibuild/build_all.sh +++ b/xibuild/build_all.sh @@ -80,7 +80,7 @@ build_all () { if build_all; then - printf "\n${PASS}Built all packages!" + printf "\n${PASS}Built all packages!\n${RESET}" exit 0 else printf "${ERROR} Something went wrong!${NEUTRAL} Press enter to view recent log" diff --git a/xibuild/make_infos.sh b/xibuild/make_infos.sh index 08035a5..16cf642 100755 --- a/xibuild/make_infos.sh +++ b/xibuild/make_infos.sh @@ -41,14 +41,23 @@ list_line() { } -for repo in $(ls -d "$XIB_EXPORT"/repo/*); do +list=$(ls -d "$XIB_EXPORT"/repo/*) +total=$(echo $list | wc -w) +i=0 +for repo in $list; do file="$repo/packages.list" [ -e $file ] && rm $file touch $file - echo "Removed old package lists in $repo" + + hbar -T "removing old repos" $i $total + i=$((i+1)) done +hbar -t -T "removing old repos" $i $total -for pkg in $(ls "$XIB_EXPORT"/repo/*/*.xipkg); do +list=$(ls "$XIB_EXPORT"/repo/*/*.xipkg) +total=$(echo $list | wc -w) +i=0 +for pkg in $list; do name=$(basename -s ".xipkg" $pkg) repo=$(echo $pkg | rev | cut -d/ -f2 | rev) info_file="$XIB_EXPORT/repo/$repo/$name.xipkg.info" @@ -59,5 +68,9 @@ for pkg in $(ls "$XIB_EXPORT"/repo/*/*.xipkg); do get_info $pkg > $info_file sign $pkg >> $info_file list_line $pkg >> "$XIB_EXPORT"/repo/$repo/packages.list - echo "Enlisted $name to $info_file" + + hbar -T "generating info" $i $total + i=$((i+1)) done +hbar -t -T "generating info" $i $total +printf "${INFO}Created $i info files!\n" -- cgit v1.2.1