*.sh: remove hard-coded bits with config.pl
[girocco/ztw.git] / fixup.sh.in
blob0b0bc596de83230ffcbf00dc03fb239f0460658e
1 #!/bin/bash
3 # THIS SCRIPT IS BEING RUN UNDER ROOT!!!
5 # [repo.or.cz] You will need to manually update this file if you modify
6 # it in the repository.
8 set -e
10 proj="$1"
11 cd "$proj.git"
13 chmod ug+rw,o+r . -R 2>&1 | (grep -v 'No such file or directory' || true)
15 [ -e .nofetch ] || exit
17 xproj="$(echo "$proj" | sed 's/[.\/]/\\&/g')"
18 gid="$(sed -ne "/^$xproj:/ { s/^[^:]*:[^:]*:\([0-9]*\):.*/\1/; p }" @jail_path@@group_path)"
19 if [ "$gid" = "" ]; then
20 #echo "cannot resolve gid for $proj ($xproj)" >&2
21 exit 1
24 chown repo."$gid" info refs objects -R 2>&1 | (grep -v 'No such file or directory' || true)