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/check13
1 files changed, 12 insertions, 1 deletions
diff --git a/bin/check b/bin/check
index 9e187cf..3acb635 100755
--- a/bin/check
+++ b/bin/check
@@ -15,11 +15,13 @@ fi
find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$
nof_packages=`cat /tmp/update_packages.$$ | wc -l`
+nof_aur_packages=`wc -l ${aur_state_dir}/packages | cut -f 1 -d ' '`
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_aur_packages} packages in AUR"
> "${data_dir}/stats"
echo "packages_state\t${nof_packages}" >> "${data_dir}/stats"
@@ -43,9 +45,18 @@ done
> "${data_dir}/missing_state_file"
for pkgfile in `find "${packages_dir}" -type f -name PKGBUILD`; do
repo_in_pkgfile=`echo $pkgfile | rev | cut -f 2-3 -d / | rev`
+ pkgname_in_pkgfile=`echo $pkgfile | rev | cut -f 2 -d / | rev`
state_file="${state_dir}/${repo_in_pkgfile}"
if test ! -f "${state_file}"; then
- echo "${repo_in_pkgfile}\tnot in state repo anymore" >> "${data_dir}/missing_state_file"
+ grep "^${pkgname_in_pkgfile}$" "${aur_state_dir}/packages" 2>&1 >/dev/null
+ if test $? = 0; then
+ state='missing'
+ aur_state="<a href=\"https://aur.archlinux.org/packages/${pkgname_in_pkgfile}\">${pkgname_in_pkgfile}</a>"
+ else
+ state='missing'
+ aur_state='missing'
+ fi
+ echo "${repo_in_pkgfile}\t${state}\t${aur_state}" >> "${data_dir}/missing_state_file"
fi
done
nof_missing_state_files=`cat ${data_dir}/missing_state_file | wc -l`