Fix bug 95280 in genkernel. ARCH_OVERRIDE in /etc/genkernel.conf should work now
[genkernel.git] / gen_arch.sh
1 #!/bin/bash
2
3 get_official_arch() {
4         if [ "${CMD_ARCHOVERRIDE}" != '' ]
5         then
6                 ARCH=${CMD_ARCHOVERRIDE}
7         else
8                 if [ "${ARCH_OVERRIDE}" != '' ]
9                 then
10                         ARCH=${ARCH_OVERRIDE}
11                 else
12                         ARCH=`uname -m`
13                         case "${ARCH}" in
14                                 i?86)
15                                         ARCH="x86"
16                                 ;;
17                                 *)
18                                 ;;
19                         esac
20                 fi
21         fi
22
23         ARCH_CONFIG="${GK_SHARE}/${ARCH}/config.sh"
24         [ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}"
25 }