Hi there!
I've been robbed last month. My good old 13-year-old Toshiba is gone... I bought a slightly less old machine, and I'm installing SliTaz back.
I've found some bugs and will propose patches for most. I thought it would be better not to post a separate thread for each bug, but I will not bundle all the patches in one single thread either, for clarity.
In this thread I post patches to some get-* scripts.
First: get-java6-jre. It doesn't work at all because the download link is broken. Moreover Java is now at version 8, and I don't see the point of downloading an old version if you can use a more recent one (but tell me if I'm wrong): this assumes the last Java is compatible with old processors, which I haven't checked.
--- get-java6-jre 2015-03-14 22:42:56.785821472 +0100
+++ get-java-jre 2015-03-19 18:15:09.061933956 +0100
@@ -5,16 +5,17 @@
#
# Author : Eric Joseph-Alexandre <erjo@slitaz.org>
-PACKAGE="java6-jre"
+PACKAGE="java-jre"
WEB_SITE="http://www.java.com/"
SHORT_DESC="SUN Java Runtime."
DEPENDS="xorg-libXtst"
-TARBALL="jre.bin"
-TEMP_DIR="/tmp/$PACKAGE.$$"
+TARBALL="jre.tar.gz"
+# This also creates TEMP_DIR
+TEMP_DIR=$(mktemp -d /tmp/$PACKAGE.XXXXXX)
ROOT="$1"
-URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
- sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"
+URL="$(wget -O - ${WEB_SITE}en/download/linux_manual.jsp?locale=en | \
+ sed '/"Download Java software for Linux"/!d;s/.*href="\([^"]*\).*/\1/;q')"
# Check if we are root starting anything
if test $(id -u) != 0 ; then
@@ -31,13 +32,11 @@
-# Create TEMP_DIR
CUR_DIR=$(pwd)
-test -d $TEMP_DIR || mkdir $TEMP_DIR
cd $TEMP_DIR
# Download the file
-test -f $TARBALL || wget $URL -O $TARBALL
+wget "$URL" -O $TARBALL
if [ ! -f $TARBALL ]; then
cd $CUR_DIR
rm -rf $TEMP_DIR
@@ -45,12 +44,9 @@
exit 1
fi
-# Do not trust 'df' free space
-sed -i 's/exit 3$//' $TARBALL
-
-# Run the install file user may agree to SUN EULA
-chmod +x $TARBALL
-sh ${TARBALL}
+tar -xzf $TARBALL
+## extracted pkg can be removed: Save RAM
+rm -rf $TARBALL
# Make the package
@@ -59,10 +55,7 @@
# use mv instead of 'cp -a' to save RAM
mv jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java
-# extracted pkg can be removed: Save RAM
-rm -rf $TARBALL
-
-#delete unecessary files
+#delete unnecessary files
rm -rf $PACKAGE-$VERSION/fs/usr/lib/java/jre${VERSION}/man
# Create receipt
@@ -85,6 +78,7 @@
cd /usr/bin
ln -s /usr/lib/java/jre\$VERSION/bin/java
+ ln -s /usr/lib/java/jre\$VERSION/bin/jcontrol
status
}
@@ -92,6 +86,7 @@
{
rm -f /usr/lib/mozilla/plugins/libnpjp2.so
rm -f /usr/bin/java
+ rm -f /usr/bin/jcontrol
}
EOT
Note how I changed the name from "java6" to only "java".
I also attach the diff as a file for convenience.
edit: looks like the forum doesn't like my file, I get a "denied mime" box.