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-28 15:17:38 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-09-28 15:17:38 +0200
commitbb1c2bc407f0cfefbaaab876dd08b59a4e7b2ccf (patch)
treea839609a6b9d2a442c0a86c9fd17250802429214
parent0540f90697718dbe3a62a7232aef027b2ae69a31 (diff)
update: some stat fixesHEADmaster
-rwxr-xr-xbin/update15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/update b/bin/update
index 17642cc..a09b7e7 100755
--- a/bin/update
+++ b/bin/update
@@ -80,8 +80,9 @@ if test "${UPDATE_UPSTREAM}" = 1; then
find "${state_dir}"/{core,extra}-{any,x86_64} -type f | sort > /tmp/update_packages.$$
- nof_checked_out_packages=0
nof_updated_packages=0
+ nof_cloned_packages=0
+ nof_checked_out_packages=0
for pkgfile in `cat /tmp/update_packages.$$`; do
repo=`echo "${pkgfile}" | rev | cut -f 2 -d / | rev`
@@ -91,6 +92,7 @@ if test "${UPDATE_UPSTREAM}" = 1; then
if test "${VERBOSE}" = 1; then
echo -n "${repo} ${pkgname}"
fi
+ nof_checked_out_packages=`expr ${nof_checked_out_packages} + 1`
if test ! -d "${packages_dir}/${repo}/${pkgname}"; then
if test "${VERBOSE}" = 1; then
echo ".. cloning .."
@@ -109,16 +111,16 @@ if test "${UPDATE_UPSTREAM}" = 1; then
git show-ref --tags > /tmp/update_package_revisions.$$
grep -F "${revision}" "/tmp/update_package_revisions.$$" 2>&1 >/tmp/update_package_revision_found.$$
if test $? = 0; then
- if test "${VERBOSE}"; then
+ if test "${VERBOSE}" = 1; then
tag=`cat /tmp/update_package_revision_found.$$ | cut -d ' ' -f 2`
echo ".. ${revision} (${tag}) exists in package history .."
fi
else
- if test "${VERBOSE}"; then
+ if test "${VERBOSE}" = 1; then
echo ".. updating .."
fi
git -C "${packages_dir}/${repo}/${pkgname}" pull
- nof_checked_out_packages=`expr ${nof_checked_out_packages} + 1`
+ nof_cloned_packages=`expr ${nof_cloned_packages} + 1`
sleep 10
fi
rm -f /tmp/update_package_revisions.$$ /tmp/update_package_revision_found.$$
@@ -131,11 +133,10 @@ if test "${UPDATE_UPSTREAM}" = 1; then
echo "Checking statistics.."
nof_packages=`cat /tmp/update_packages.$$ | wc -l`
- nof_checked_out_packages=`find "${packages_dir}" -type f -name PKGBUILD | wc -l`
echo "${nof_packages} packages in state repo"
- echo "${nof_checked_out_packages} packages are checked out"
- echo "${nof_checked_out_packages} packages have been checked out"
+ echo "${nof_checked_out_packages} packages are checked out totally"
+ echo "${nof_cloned_packages} packages have been newly cloned"
echo "${nof_updated_packages} packages have been updated"
fi
fi