uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
33
pkgs/build-support/nuke-references/nuke-refs.sh
Normal file
33
pkgs/build-support/nuke-references/nuke-refs.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#! @shell@
|
||||
|
||||
fixupHooks=()
|
||||
|
||||
if [ -e @out@/nix-support/setup-hooks.sh ]; then
|
||||
source @out@/nix-support/setup-hooks.sh
|
||||
fi
|
||||
|
||||
excludes=""
|
||||
while getopts e: o; do
|
||||
case "$o" in
|
||||
e) storeId=$(echo "$OPTARG" | @perl@/bin/perl -ne "print \"\$1\" if m|^\Q@storeDir@\E/([a-z0-9]{32})-.*|")
|
||||
if [ -z "$storeId" ]; then
|
||||
echo "-e argument must be a Nix store path"
|
||||
exit 1
|
||||
fi
|
||||
excludes="$excludes(?!$storeId)"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
for i in "$@"; do
|
||||
if test ! -L "$i" -a -f "$i"; then
|
||||
cat "$i" | @perl@/bin/perl -pe "s|\Q@storeDir@\E/$excludes[a-z0-9]{32}-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" > "$i.tmp"
|
||||
if test -x "$i"; then chmod +x "$i.tmp"; fi
|
||||
mv "$i.tmp" "$i"
|
||||
|
||||
for hook in "${fixupHooks[@]}"; do
|
||||
eval "$hook" "$i"
|
||||
done
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue