Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-09-25 20:14:39 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-09-25 20:14:39 +0200
commit0b28119272480c89f038501a4e9fa2b1720ace29 (patch)
treeded9edbb4181cf825ad270fffee24cea8330dafe
parentc54cdadacaecc56c896c52a96f9d7ddda2be827a (diff)
update: make -u work without -s, add -v/--verbose flag
-rwxr-xr-xbin/update16
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/update b/bin/update
index 99fea78..1d317ed 100755
--- a/bin/update
+++ b/bin/update
@@ -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}"