index : checker | |
Archlinux32 consistency checker | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2024-09-25 20:14:39 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2024-09-25 20:14:39 +0200 |
commit | 0b28119272480c89f038501a4e9fa2b1720ace29 (patch) | |
tree | ded9edbb4181cf825ad270fffee24cea8330dafe | |
parent | c54cdadacaecc56c896c52a96f9d7ddda2be827a (diff) |
-rwxr-xr-x | bin/update | 16 |
@@ -6,7 +6,8 @@ BASE="${0%/*}/.." UPATE_UPSTREAM=0 UPDATE_AUR=0 STATS=0 -OPTIONS=`getopt -n update -o huas -l help,upstream,aur,stats -- "$@"` +VERBOSE=0 +OPTIONS=`getopt -n update -o huasv -l help,upstream,aur,stats,verbose -- "$@"` if test $? != 0; then echo "ERROR: internal error which using getopt.." >&2; exit 1 @@ -20,6 +21,7 @@ while true; do echo "-u --upstream update from update git state and package repo" echo "-a --aur update from the AUR" echo "-s --stats compute and print statistics" + echo "-v --verbose be verbose" exit 0 ;; @@ -38,6 +40,11 @@ while true; do shift ;; + -v|--verbose) + VERBOSE=1 + shift + ;; + --) shift break @@ -71,10 +78,11 @@ if test "${UPDATE_UPSTREAM}" = 1; then git -C "${state_dir}" pull + find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$ + if test "${STATS}" = 1; then echo "Checking statistics.." - find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$ nof_packages=`cat /tmp/update_packages.$$ | wc -l` nof_checked_out_packages=`find "${packages_dir}" -type f -name PKGBUILD | wc -l` @@ -89,7 +97,9 @@ if test "${UPDATE_UPSTREAM}" = 1; then OLDIFS="$IFS" IFS=" " while read pkgname pkgver tag revision; do - echo "${repo} ${pkgname}" + if test "${VERBOSE}" = 1; then + echo "${repo} ${pkgname}" + fi if test ! -d "${packages_dir}/${repo}/${pkgname}"; then cd "${packages_dir}/${repo}" || exit 1 pkgctl repo clone --protocol=https "${pkgname}" |