system/nvidia-kernel: Fix ordering of arch detection

Thanks to Max Miorim for the report.

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Robby Workman 2010-06-05 21:40:20 -05:00
parent 87f841e029
commit 44b7865829
1 changed files with 14 additions and 14 deletions

View File

@ -24,15 +24,25 @@
# Thanks to Robby Workman for suggestions to improve this script.
PRGNAM=nvidia-kernel
VERSION=195.36.15
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
KERNEL=${KERNEL:-$(uname -r)}
KERNELPATH=${KERNELPATH:-/lib/modules/${KERNEL}/build}
VERSION=195.36.15
PRGNAM=nvidia-kernel
PKGVER=${VERSION}_$(echo $KERNEL | tr - _)
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
if [ "$ARCH" = "i486" ]; then
TARGET="x86"
@ -46,16 +56,6 @@ unset ARCH
SRCNAM=NVIDIA-Linux-$TARGET-$VERSION-pkg0
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=${PKG:-$TMP/package-$PRGNAM}