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
|
|
@ -0,0 +1,37 @@
|
|||
#! @shell@ -e
|
||||
|
||||
fixupHooks=()
|
||||
|
||||
if [ -e @out@/nix-support/setup-hooks.sh ]; then
|
||||
source @out@/nix-support/setup-hooks.sh
|
||||
fi
|
||||
|
||||
# References to remove
|
||||
targets=()
|
||||
while getopts t: o; do
|
||||
case "$o" in
|
||||
t) storeId=$(echo "$OPTARG" | sed -n "s|^@storeDir@/\\([a-z0-9]\{32\}\\)-.*|\1|p")
|
||||
if [ -z "$storeId" ]; then
|
||||
echo "-t argument must be a Nix store path"
|
||||
exit 1
|
||||
fi
|
||||
targets+=("$storeId")
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
|
||||
# Files to remove the references from
|
||||
regions=()
|
||||
for i in "$@"; do
|
||||
test ! -L "$i" -a -f "$i" && regions+=("$i")
|
||||
done
|
||||
|
||||
for target in "${targets[@]}" ; do
|
||||
sed -i -e "s|@storeDir@/$target-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" "${regions[@]}"
|
||||
done
|
||||
|
||||
for region in "${regions[@]}"; do
|
||||
for hook in "${fixupHooks[@]}"; do
|
||||
eval "$hook" "$i"
|
||||
done
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue