index : checker | |
Archlinux32 consistency checker | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | bin/check | 9 | ||||
-rwxr-xr-x | bin/genhtml | 15 | ||||
-rwxr-xr-x | bin/setup | 8 | ||||
-rwxr-xr-x | bin/update | 4 |
@@ -21,15 +21,18 @@ 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 +> "${data_dir}/stats" +echo "packages_state\t${nof_packages}" >> "${data_dir}/stats" +echo "packages_repos\t${nof_checked_out_packages}" >> "${data_dir}/stats" # find duplicate entries in state repo +> "${data_dir}/duplicates" 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" + echo -n "${instance} " >> "${data_dir}/duplicates" + cat "${state_dir}/$instance" >> "${data_dir}/duplicates" done done done diff --git a/bin/genhtml b/bin/genhtml new file mode 100755 index 0000000..8593727 --- /dev/null +++ b/bin/genhtml @@ -0,0 +1,15 @@ +#!/bin/oksh + +BASE="${0%/*}/.." +. "${BASE}/conf/default.conf" + +if test ! -d "${html_dir}"; then + echo "no html output diretory found.. call setup first." + exit 1 +fi + +FILES="summary" + +for file in $FILES; do + m4 -I "${templates_dir}" -P < "${templates_dir}/${file}.m4" > "${html_dir}/${file}.html" +done @@ -22,6 +22,7 @@ else echo "package directory exists" fi + for repo in core extra; do for arch in any x86_64; do if test ! -d "${packages_dir}/${repo}-${arch}"; then @@ -33,4 +34,11 @@ for repo in core extra; do done done +if test ! -d "${data_dir}"; then + echo "creating directory for storing data.." + mkdir -p "${data_dir}" +else + echo "data directory exists" +fi + # TODO: AUR directory @@ -13,8 +13,12 @@ if test ! -d "${packages_dir}"; then exit 1 fi +echo "Updating main state git repo.." + git -C "${state_dir}" pull +echo "Checking statistics.." + find "${state_dir}"/{core,extra}-{any,x86_64} -type f > /tmp/update_packages.$$ nof_packages=`cat /tmp/update_packages.$$ | wc -l` |