nuke-refs: Don't assume /nix/store

svn path=/nixpkgs/trunk/; revision=30090
This commit is contained in:
Shea Levy 2011-10-28 21:23:40 +00:00
parent 819198fba0
commit 9afc1f6a24

View File

@ -5,7 +5,7 @@ cat > $out/bin/nuke-refs <<EOF
#! $SHELL -e #! $SHELL -e
for i in \$*; do for i in \$*; do
if test ! -L \$i -a -f \$i; then if test ! -L \$i -a -f \$i; then
cat \$i | sed "s|/nix/store/[a-z0-9]*-|/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > \$i.tmp cat \$i | sed "s|$NIX_STORE/[a-z0-9]*-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > \$i.tmp
if test -x \$i; then chmod +x \$i.tmp; fi if test -x \$i; then chmod +x \$i.tmp; fi
mv \$i.tmp \$i mv \$i.tmp \$i
fi fi