author | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-12 16:12:45 UTC |
committer | Urja (ARMLFS builder)
<urja+armlfs@urja.dev> 2024-07-12 16:12:45 UTC |
parent | 2b462a5acbfd4fdf2a6343a1d513eaf5be4d8569 |
add-arch.sh | +19 | -0 |
diff --git a/add-arch.sh b/add-arch.sh new file mode 100755 index 0000000..a744ef1 --- /dev/null +++ b/add-arch.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -e +set -x +A=aarch64 +while read pkg xx; do +arg=$pkg/PKGBUILD +if [ ! -e $arg ]; then + continue +fi +if ARCHLINE=$(grep "arch=" $arg); then + if echo "$ARCHLINE" | grep -q $A; then + true + elif echo "$ARCHLINE" | grep -q any; then + true + else + sed -i -e "/^arch=/s/[)]/ \'$A\'\)/" $arg + fi +fi +done < $1