6 # /var/cache/git/ -> /var/lib/git/ transition
7 if test "$1" = upgrade
&&
8 dpkg
--compare-versions "$2" lt-nl
'1:1.8.4~rc0-1'; then
9 mkdir
-m 755 -p /var
/lib
/git
12 for target
in ..
/..
/cache
/git
/*; do
13 if ! test -L "$target" && ! test -e "$target"; then
17 link
=${target#../../cache/git/}
18 if ! test -L "$link" && ! test -e "$link"; then
19 ln -s "$target" "$link"
25 # A previous version of the /var/lib/git/ transition code
26 # left behind a symlink '/var/lib/git/*' -> '../../cache/git/*'.
27 if test "$1" = upgrade
&&
28 dpkg
--compare-versions "$2" eq
'1:1.8.4~rc0-1' &&
29 test -L '/var/lib/git/*'; then
30 target
=$
(readlink
'/var/lib/git/*')
31 if test "$target" = '../../cache/git/*'; then
32 rm -f '/var/lib/git/*'