From 6583e1de51d9dcc04aedf7908aba2429fd0e0c80 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 18 Jun 2007 15:30:25 +0200 Subject: [PATCH] clone.sh: add -f to rm -r cloning stage, can be empty --- clone.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clone.sh b/clone.sh index 738faad..45a31e5 100755 --- a/clone.sh +++ b/clone.sh @@ -22,7 +22,7 @@ bang() { # This removes any remnants from /srv/git/$proj.git _and_ gets rid # of the group record. perl -I/home/repo/repomgr/cgi -MGit::RepoCGI -e 'Git::RepoCGI::Project->ghost('"'$proj'"')->delete;' - cd "$basedir" && rm -r "$proj"/* && rmdir -p "$proj" + cd "$basedir" && rm -rf "$proj"/* && rmdir -p "$proj" rm "$log" exit 1 fi @@ -44,7 +44,7 @@ bang mv base_url owner description homepage README.html /srv/git/"$proj".git/ #bang mv objects/info/alternates /srv/git/"$proj".git/objects/info/alternates # git clone should've set up that for us GIT_DIR=/srv/git/"$proj".git bang git config --bool --add mirror.allowed true GIT_DIR=/srv/git/"$proj".git bang git update-server-info -cd "$basedir" && rm -r "$proj"/* && rmdir -p "$proj" +cd "$basedir" && rm -rf "$proj"/* && rmdir -p "$proj" # NO bang AT THIS POINT! rm -r depends on cwd. echo "Congratulations! You can adjust the project settings in the future at http://repo.or.cz/m/p/editproj.cgi." | mail -s "[repo.or.cz] $proj clone completed" "$mail",pasky@ucw.cz rm "$log" -- 2.11.4.GIT