File: java-arch.sh

package info (click to toggle)
javatools 0.80
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 420 kB
  • sloc: perl: 1,358; sh: 939; java: 56; makefile: 39
file content (41 lines) | stat: -rwxr-xr-x 598 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh --

if [ "-h" = "$1" ] || [ "--help" = "$1" ]; then
    echo "Usage: java-arch.sh [debian arch name]"
    echo "Returns the equivelent name used by the JDK for that arch"
    echo "or the debian build arch if not specified"
    exit 0
fi

if [ -z "$1" ]; then
    DPKG_ARCH=`dpkg --print-architecture`
else
    DPKG_ARCH="$1"
fi

case $DPKG_ARCH in
	arm64)
		echo aarch64
		;;
	armel|armeb|armhf)
		echo arm
		;;
	powerpc|powerpcspe)
		echo ppc
		;;
	ppc64el)
		echo ppc64le
		;;
	hppa)
		echo parisc
		;;
	sparc64)
		echo sparc
		;;
	sh4)
		echo sh
		;;
	*)
		echo  $DPKG_ARCH
		;;
esac