Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/check
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check')
-rwxr-xr-xbin/check38
1 files changed, 38 insertions, 0 deletions
diff --git a/bin/check b/bin/check
new file mode 100755
index 0000000..43a047c
--- /dev/null
+++ b/bin/check
@@ -0,0 +1,38 @@
+#!/bin/oksh
+
+BASE="${0%/*}/.."
+. "${BASE}/conf/default.conf"
+
+if test ! -d "${state_dir}"; then
+ echo "no upstream git state repo of packages.. exiting.."
+ exit 1
+fi
+
+if test ! -d "${packages_dir}"; then
+ echo "no directory for uptream package descriptions.. exiting.."
+ exit 1
+fi
+
+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`
+
+echo "${nof_packages} packages in state repo"
+echo "${nof_checked_out_packages} packages are checked out"
+
+exit 0
+
+# find duplicate entries in state repo
+for duplicate in `find "${state_dir}"/{core,extra}-{any,x86_64} -type f | \
+ rev | cut -f 1 -d / | rev | sort | uniq -D | uniq`; do
+ for packages in `ls ${state_dir}/{core,extra}-{any,x86_64}/$duplicate 2>/dev/null`; do
+ for instance in `echo $packages | rev | cut -f 1,2 -d / | rev`; do
+ echo -n "${instance} "
+ cat "${state_dir}/$instance"
+ done
+ done
+done
+
+# TODO: update all single package directories
+# TODO: update all AUR package directories