mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 02:24:27 +00:00
1c623126c7
bash. Also, use the cpio from klibc instead of tar. svn path=/nixpkgs/branches/stdenv-updates/; revision=13905
15 lines
361 B
Bash
15 lines
361 B
Bash
source $stdenv/setup
|
|
|
|
ensureDir $out/bin
|
|
cat > $out/bin/nuke-refs <<EOF
|
|
#! $SHELL -e
|
|
for i in \$*; do
|
|
if test ! -L \$i -a -f \$i; then
|
|
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
|
|
mv \$i.tmp \$i
|
|
fi
|
|
done
|
|
EOF
|
|
chmod +x $out/bin/nuke-refs
|