From 0ed03271e002bce4b2c66a4f4acd7b43ba04fa85 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 1 Feb 2015 21:46:16 -0800 Subject: [PATCH] toolbox: change some hard-coded values to Config.pm variables --- toolbox/inactive.sh | 5 ++++- toolbox/remove-inactive-projects.sh | 12 ++++++------ toolbox/trash-project.pl | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/toolbox/inactive.sh b/toolbox/inactive.sh index afb01c6..04e71f1 100644 --- a/toolbox/inactive.sh +++ b/toolbox/inactive.sh @@ -1,5 +1,8 @@ #!/bin/sh +echo "Not ready for usage yet; have to figure out locking and check conditions --jast" +exit 99 + . @basedir@/shlib.sh echo Checking for inactive projects (empty repositories) @@ -8,7 +11,7 @@ cd "$cfg_reporoot" mkdir -p "$cfg_reporoot-recyclebin" for i in $(find . -name heads -type d); do [ "$(ls $i)" ] && continue; fb="${i##*/}"; fb="${fb%.git}"; [ -d "$i/../../../$fb" ] && continue; [ -e "$i/../../packed-refs" ] && continue; echo "${i%/refs/heads} $(cat $i/../../owner)"; done >sack -while read x y; do echo -e 'Hello,\n\nI have removed your project '$x' from repo.or.cz since you have set it up quite some time ago and nothing has ever been pushed in (I run this job once in few months). If you want to publish anything on repo.or.cz in the future, feel free to create the project again. If you experienced any technical difficulties with publishing on repo.or.cz, please let me know, hopefully we can solve them together (sometimes I don't reply for some time, in that case it's best to harass me again, and repeatedly ;-). In case the automated check went wrong, the repository is still backed up...\n\nThanks for using repo.or.cz!\n\n\t\t\tPetr Baudis ' | mail -s '[repo.or.cz] Automated project removal' $y; done ' | mail -s "[$cfg_name] Automated project removal" $y; done which will + (You may also contact our support team at <$cfg_admin> which will probably get you faster answers.) EOM done <$OUT diff --git a/toolbox/trash-project.pl b/toolbox/trash-project.pl index 3f33f19..1ddd972 100755 --- a/toolbox/trash-project.pl +++ b/toolbox/trash-project.pl @@ -70,4 +70,4 @@ if (!$delete) { system("GIT_DIR=$bin/$project.git git config girocco.recycletime $recycletime"); } $p->delete(); -print "Project '$project' removed from repo.or.cz". ($delete ? '' : ", backup in $bin/$project.git") .".\n"; +print "Project '$project' removed from $Girocco::Config::name". ($delete ? '' : ", backup in $bin/$project.git") .".\n"; -- 2.11.4.GIT