summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Henrik Bruhn2020-12-12 14:08:15 +0100
committerJan-Henrik Bruhn2020-12-12 14:08:15 +0100
commitaa9d4d98ab9cfe1af44ddd1377a2cfeda6385f99 (patch)
treed740181b858c8efd1e2900a23e904c18a3182986
parentd251a1f80eb8a0a5c8c307ef326f690ba729785e (diff)
downloadaur-aa9d4d98ab9cfe1af44ddd1377a2cfeda6385f99.tar.gz
Add Progress Indicator to PKGBUILD
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD11
2 files changed, 9 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 12cb0b0a2b6c..7d268d47dccd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ltspice
pkgdesc = SPICE simulator, schematic capture and waveform viewer. Installation based on Field Update Utility.
pkgver = 17.20201204.4
- pkgrel = 1
+ pkgrel = 2
url = http://www.linear.com/designtools/software/
arch = x86_64
license = custom
diff --git a/PKGBUILD b/PKGBUILD
index c6ae31f570b1..35dcd077f240 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ _ltspice_ver="17"
pkgname=ltspice
pkgver=17.20201204.4
-pkgrel=1
+pkgrel=2
pkgdesc="SPICE simulator, schematic capture and waveform viewer. Installation based on Field Update Utility."
arch=('x86_64')
url="http://www.linear.com/designtools/software/"
@@ -100,8 +100,11 @@ build() {
release_logs="$_update_url/release.log.gz"
curl $_curl_opts "$release_logs" | gunzip > ./release.log
-
+
+ total=$(cat release.log | sed '/^#/d' | wc -l)
+ count=0
echo "Checking cache and downloading using $N threads."
+ echo "Starting..."
for entry in $(cat release.log | sed '/^#/d' | awk '{print $6"/"$8}')
do
file=$(echo $entry | awk -F/ '{print $2}' | sed 's/\\/\//g' | tr -d '\n\r')
@@ -109,11 +112,13 @@ build() {
crc=$(echo $entry | awk -F/ '{print $1}')
# download files from list, checking the CRC (something is still wrong with the CRC it seems)
run_with_lock _download_file "$file" "$crc"
+ count=$((count+1))
+ echo -n -e "\033[1K\rDownload Progress: $count/$total ($file)"
done
wait
- echo "Downloaded files."
+ echo "Downloaded all files!"
}
package()