index : checker | |
Archlinux32 consistency checker | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2024-09-19 15:23:25 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2024-09-19 15:23:25 +0200 |
commit | b98887e1a4f044e13ba15a09486f615672ba472a (patch) | |
tree | bbbf1a94b9150a48068988b7b72d41dc71a94d3b /bin/check | |
parent | c8f372b24fef9c52e93c85f90df59ec2a1511b4a (diff) |
-rwxr-xr-x | bin/check | 13 |
@@ -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` |