]> git.wh0rd.org - home.git/commitdiff
add ppc/ppc64 support
authorMike Frysinger <vapier@gentoo.org>
Tue, 5 Jan 2010 02:53:24 +0000 (18:53 -0800)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:34 +0000 (15:36 -0400)
.bin/custom-chroot

index ab69e9200b14ac794afd906b0f9313f32c94f002..a96b181072d6bba86773f50ac2b7ff2bff8a170d 100755 (executable)
@@ -43,15 +43,14 @@ done
 
 get_type() {
        case $(file "$1") in
-               *x86-64*)        echo x86_64;;
-               *"Intel 80386"*) echo i386;;
+               *x86-64*)         echo x86_64;;
+               *"Intel 80386"*)  echo i386;;
+               *32-bit*PowerPC*) echo ppc;;
+               *64-bit*PowerPC*) echo ppc64;;
        esac
 }
 bin_dst=$(get_type bin/bash)
-bin_src=$(get_type /bin/bash)
-if [[ ${bin_dst} == ${bin_src} ]] ; then
-       setarch=
-else
+if [[ -n ${bin_dst} ]] && type -P setarch &>/dev/null ; then
        setarch="setarch ${bin_dst}"
 fi