3 export PATH
=/home
/pasky
/bin
:$PATH
7 log
="$(mktemp -t repomgr-XXXXXX)"
11 mail="$(cat .admin_contact)"
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 -rf "$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
mv base_url
/srv
/git
/"$proj".git
/description
33 bang
mv .admin_contact
/srv
/git
/"$proj".git
/owner
34 cd ..
&& rm -rf "$proj"
35 # NO bang AT THIS POINT! rm -rf depends on cwd.
36 echo "Congratulations!" |
mail -s "[repo.or.cz] $proj clone completed" "$mail",pasky@ucw.cz