File: java-arch.sh

package info (click to toggle)
javatools 0.48%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 416 kB
  • ctags: 72
  • sloc: sh: 1,515; perl: 930; makefile: 35
file content (43 lines) | stat: -rwxr-xr-x 586 bytes parent folder | download
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
42
43
#!/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