git » base-pkgbuilds.git » main » tree

[main] / add-arch.sh

#!/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