summaryrefslogtreecommitdiff
path: root/morph-arch
blob: 25f91758a488324963ddf72ced0a1e1b0a766b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Get Linux ARCH from Morph architecture

if [ -z "$MORPH_ARCH" ]; then
    echo "Error: MORPH_ARCH is not set" >&2
    exit 1
fi

case "$MORPH_ARCH" in
    armv7b|armv7l|armv7lhf)
        echo arm ;;
    x86_32)
        echo i386 ;;
    x86_64)
        echo x86_64 ;;
    ppc64)
        echo powerpc ;;
    *)
        echo "Error: unsupported Morph architecture: $MORPH_ARCH" >&2
        exit 1
esac