3 export PATH
=/home
/pasky
/bin
:$PATH
7 log
="$(mktemp -t repomgr-XXXXXX)"
14 if ! "$@" >>"$log" 2>&1; then
16 echo "$* failed with error code $?"
19 } |
mail -s "[repo.or.cz] $proj clone failed" "$mail",pasky@ucw.cz
21 rm -rf /srv
/git
/$proj.git
22 cd ..
&& rm -r "$proj"
28 bang git clone
--bare "$url" repodir
29 GIT_DIR
=repodir bang git repack
-a -d
30 ! [ -d /srv
/git
/"$proj".git
]
31 bang
mv repodir
/srv
/git
/"$proj".git
32 bang
chmod g
+w base_url owner description homepage
33 bang
mv base_url owner description homepage
/srv
/git
/"$proj".git
/
34 cd ..
&& rm -r "$proj"
35 # NO bang AT THIS POINT! rm -r depends on cwd.
36 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