You are not logged in.
Say i have a package with depends=('a' 'b' 'c')
Is there a simple way to specify the dependencies for x86_64 arch (they are the same, just with lib32- in front, of course),
something like [[ "$CARCH" == 'x86_64' ]] && depends=("lib32-$depends") ?
Last edited by lemanski6 (2012-04-29 16:26:29)
Offline
Here is what i did once:
if [ "$CARCH" = "x86_64" ]; then
for i in ${!depends[*]}; do depends[$i]="lib32-"${depends[$i]}; done
fiThough there is probably a better way of doing it.
Offline
if [ "$CARCH" == 'i686' ]; then
depends=( 'a' 'b' 'c' )
elif [ "$CARCH" == 'x86_64' ]; then
depends=( 'lib32-a' 'lib32-b' 'lib32-c' )
fi
It may not seem very pratical, but, in my opinion, it is better to list all packages, because AUR web interface won't parse correctly bash scripts in depends. Also, if you don't separate dependencies of 32-bit from 64-bit, it will mess up too.
For example: The following lines will return 'a' for 64-bit system, which is wrong:
depends=('a')
[ "$CARCH" == 'x86_64' ] && depends=('lib32-a')
Offline
Thanks
Offline