Fix broken upstream user unit symlinks

This commit is contained in:
Eelco Dolstra 2014-04-18 17:38:06 +02:00
parent 85fdaed9de
commit 1e540af43b

View file

@ -379,7 +379,12 @@ let
fn=${systemd}/example/systemd/${type}/$i
if ! [ -e $fn ]; then echo "missing $fn"; false; fi
if [ -L $fn ]; then
cp -pd $fn $out/
target="$(readlink "$fn")"
if [ ''${target:0:3} = ../ ]; then
ln -s "$(readlink -f "$fn")" $out/
else
cp -pd $fn $out/
fi
else
ln -s $fn $out/
fi