Skip to content

Commit aaeef69

Browse files
committed
update jinstall.sh
1 parent ee369d4 commit aaeef69

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
112
1+
113

script/jinstall.sh

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ set -eu
1010
V=j9.7
1111

1212
OS=$(uname -s)
13-
if [ "$OS" != "Darwin" ] && [ "$OS" != "Linux" ]; then
14-
printf "This script only works for Linux or macOS, not for $OS\n"
13+
ARCH=$(uname -m)
14+
if [ "$OS" != "Darwin" ] && [ "$OS" != "Linux" ] && [ "$OS" != "FreeBSD" ] && [ "$OS" != "OpenBSD" ]; then
15+
printf "This script only works for Linux macOS FreeBSD or OpenBSD, not for $OS\n"
1516
exit 1
1617
fi
1718

@@ -150,7 +151,7 @@ else
150151
m="$m and no Addons"
151152
fi
152153

153-
printf "$m in $D\n"
154+
printf "$m in $D/$V\n"
154155

155156
if [ "$FORCE" = 0 ]; then
156157
printf 'OK to continue? (y/N) '
@@ -172,13 +173,33 @@ if [ "$OS" = "Darwin" ]; then
172173
curl -OL $S/$W
173174
unzip $W
174175
else
175-
W=${V}_linux64.tar.gz
176+
if [ "$OS" = "Linux" ]; then
177+
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ] ; then
178+
W=${V}_raspi64.tar.gz
179+
elif [ "$ARCH" = "armv6l" ]; then
180+
W=${V}_raspi32.tar.gz
181+
else
182+
W=${V}_linux64.tar.gz
183+
fi
184+
elif [ "$OS" = "FreeBSD" ]; then
185+
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ] ; then
186+
printf "This script only works for x86_64\n" ; exit 1
187+
else
188+
W=${V}_fbsd64.tar.gz
189+
fi
190+
elif [ "$OS" = "OpenBSD" ]; then
191+
if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ] ; then
192+
printf "This script only works for x86_64\n" ; exit 1
193+
else
194+
W=${V}_obsd64.tar.gz
195+
fi
196+
fi
176197
wget $S/$W
177198
tar -xf $W
178199
fi
179200

180201
# ----------------------------------------------------------------------
181-
if [ "$D" = "/usr" ]; then
202+
if [ "$OS" = "Linux" ] && [ "$D" = "/usr" ]; then
182203
cd $V
183204
bin/jconsole -js "install 'system $P $A'"
184205
if [ -f "/etc/alternatives/ijconsole" ]; then

script/makejinstall.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ P=`pwd`
33

44
cd script
55
chmod +x jinstall.sh
6-
tar -czf ../linux64_install.tar.gz jinstall.sh
7-
8-
cp jinstall.sh jinstall.command
9-
zip ../mac64_install.zip jinstall.command
6+
tar -czf ../unix.tar.gz jinstall.sh
107

118
cd ..
129
ls -alrt

0 commit comments

Comments
 (0)