You are not logged in.
How would one go about listing alternate dependencies for i686 and x86_64? For example, a program requires java-environment and sh on both environments, but when installed on x86_64 also requires lib32-glibc to run, how could that be specified in the depends() array? I've tried:
if [ "$CARCH" = "i686" ]; then
depends=('sh' 'java-environment')
elif [ "$CARCH" = "x86_64" ]; then
depends=('sh' 'lib32-glibc' 'java-environment')
fi
but that doesn't seem to work, as my i686 installation does not have lib32-glibc installed. Adding 'glibc' to the first depends array doesn't work either.
Last edited by machoo02 (2010-11-04 12:27:14)
Offline
Try
if [[ $CARCH == "i686" ]]; then
depends=('sh' 'java-environment')
elif [[ $CARCH == "x86_64" ]]; then
depends=('sh' 'lib32-glibc' 'java-environment')
fi
Offline
depends=('sh' 'java-environment')
[[ $CARCH == "x86_64" ]] && depends=("${depends[@]}" ''lib32-glibc')
sounds more clean
Give what you have. To someone, it may be better than you dare to think.
Offline
Thanks to both of you for the suggestions. wonder...your version worked.
Offline