File: blackdown-j2re.sh

package info (click to toggle)
java-package 0.24
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 224 kB
  • ctags: 42
  • sloc: sh: 1,149; makefile: 71
file content (132 lines) | stat: -rw-r--r-- 3,631 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Detect product
function blackdown_j2re_detect() {
  local found=
  eval $(dpkg-architecture)
  case "$DEB_BUILD_GNU_TYPE" in
    "i386-linux")
      case "$archive_name" in
	"j2re-1.3.1-02b-FCS-linux-i386.bin") # SUPPORTED
	    j2se_version=1.3.1+02a
	    j2se_expected_min_size=35 # 35882 kB
	    found=true
	    ;;
	"j2re-1.3.1-02b-FCS-linux-i386.bin") # SUPPORTED
	    j2se_version=1.3.1+02b
	    j2se_expected_min_size=35 # 35882 kB
	    found=true
	    ;;
	"j2re-1.4.1-01-linux-i586-gcc2.95.bin") # SUPPORTED
	    j2se_version=1.4.1+01
	    j2se_expected_min_size=51 # 52631 kB
	    found=true
	    ;;
	"j2re-1.4.1-01-linux-i586-gcc3.2.bin") # SUPPORTED
	    j2se_version=1.4.1+01
	    j2se_expected_min_size=48 # 49988 kB
	    found=true
	    ;;
	"j2re-1.4.2-rc1-linux-i586-gcc2.95.bin") # SUPPORTED
	    j2se_version=1.4.2+rc1
	    j2se_expected_min_size=48 # 49988 kB
	    found=true
	    ;;
	"j2re-1.4.2-rc1-linux-i586-gcc3.2.bin") # SUPPORTED
	    j2se_version=1.4.2+rc1
	    j2se_expected_min_size=48 # 49988 kB
	    found=true
	    ;;
	"j2re-1.4.2-fcs-linux-i586-gcc2.95.bin") # SUPPORTED
	    j2se_version=1.4.2
	    j2se_expected_min_size=56 # 58044 kB
	    found=true
	    ;;
	"j2re-1.4.2-fcs-linux-i586-gcc3.2.bin") # SUPPORTED
	    j2se_version=1.4.2
	    j2se_expected_min_size=54 # 55524 kB
	    found=true
	    ;;
	"j2re-1.4.2-01-linux-i586.bin") # SUPPORTED
	    j2se_version=1.4.2+01
	    j2se_expected_min_size=54 # 54958 kB
	    found=true
	    ;;
      esac
      ;;
    "sparc-linux")
      case "$archive_name" in
	"j2re-1.3.1-02b-FCS-linux-sparc.bin") # SUPPORTED
	    j2se_version=1.3.1+02b
	    j2se_expected_min_size=26 # 27064 kB
	    found=true
	    ;;
        "j2re-1.4.1-01-linux-sparc-gcc3.2.bin") # SUPPORTED
	    j2se_version=1.4.1+01
	    j2se_expected_min_size=55 # 57084 kB
	    found=true
	    ;;
      esac
      ;;
    "x86_64-linux")
      case "$archive_name" in
	"j2re-1.4.2-rc1-linux-amd64.bin") # SUPPORTED
	    j2se_version=1.4.2+rc1
	    j2se_expected_min_size=53 # 54748 kB
	    found=true
	    ;;
	"j2re-1.4.2-fcs-linux-amd64.bin") # SUPPORTED
	    j2se_version=1.4.2
	    j2se_expected_min_size=54 # 55468 kB
	    found=true
	    ;;
	"j2re-1.4.2-01-linux-amd64.bin") # SUPPORTED
	    j2se_version=1.4.2+01
	    j2se_expected_min_size=54 # 55071 kB
	    found=true
	    ;;
      esac
      ;;
    "powerpc-linux")
      case "$archive_name" in
	"j2re-1.3.1-14-FCS-linux-ppc.bin") # SUPPORTED
	    j2se_version=1.3.1
	    j2se_expected_min_size=10 # 11508915 bytes
	    found=true
	    ;;
        "j2re-1.3.1-02a-FCS-linux-ppc.bin") # SUPPORTED
            j2se_version=1.3.1+02a
            j2se_expected_min_size=10 # 11010247 bytes
            found=true
            ;;
        "j2re-1.3.1-14-FCS-linux-ppc.bin") # SUPPORTED
            j2se_version=1.3.1+02b
            j2se_expected_min_size=10 # 11027038 bytes
            found=true
            ;;
        "j2re-1.3.1-02c-FCS-linux-ppc.bin") # SUPPORTED
            j2se_version=1.3.1+02c
            j2se_expected_min_size=10 # 11508915 bytes
            found=true
            ;;
      esac
      ;;
  esac
  if [[ -n "$found" ]]; then
	cat << EOF

Detected product:
    Java(TM) Runtime Environment (J2RE)
    Standard Edition, Version $j2se_version
    Blackdown Java-Linux
EOF
	if read_yn "Is this correct [Y/n]: "; then
	    j2se_found=true
	    j2se_release="${j2se_version:0:3}"
	    j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
	    j2se_vendor="blackdown"
	    j2se_title="Java(TM) 2 RE, Standard Edition, Blackdown"
	    j2re_run
	fi
    fi
}

j2se_detect_blackdown_j2re=blackdown_j2re_detect