isbpl/setup.sh

23 lines
697 B
Bash
Raw Normal View History

2022-03-05 20:57:02 +01:00
#!/bin/bash
if [ "$ISBPL_PATH" = "" ] ; then
echo 'ISBPL_PATH=/usr/lib/isbpl' >> /etc/environment
fi
IFS=: read -r BIN OTHERBIN <<< "$PATH"
2022-05-13 19:18:49 +02:00
mkdir /usr/lib/isbpl >& /dev/null
2022-05-16 00:50:38 +02:00
touch /usr/lib/isbpl/test && export BIN=/usr/bin && rm /usr/lib/isbpl/test
echo "Installing to $BIN."
2022-05-13 19:18:49 +02:00
cp ./*.isbpl /usr/lib/isbpl >& /dev/null
cd bootstrap
2022-05-13 19:18:49 +02:00
cp ../ISBPL.java .
echo ">>> There will be warnings about the Unsafe. Sadly, the code producing them is required for JIO. <<<"
javac ISBPL.java
2022-05-13 19:18:49 +02:00
rm ISBPL.java ISBPL.jar
zip -r ISBPL.jar * META-INF
rm *.class
cd ..
2022-05-16 18:25:24 +02:00
echo "#!${BIN}java -jar" > ISBPL.jar
cat bootstrap/ISBPL.jar >> ISBPL.jar
chmod a+rx ISBPL.jar
cp ISBPL.jar "${BIN}/isbpl"
chmod a+rx "${BIN}/isbpl"