Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Last active May 22, 2016 18:41
Show Gist options
  • Save dedeibel/cc73c5545e670b81427f4d4d861021e5 to your computer and use it in GitHub Desktop.
Save dedeibel/cc73c5545e670b81427f4d4d861021e5 to your computer and use it in GitHub Desktop.
install a dummy java so debian or ubuntu apt will be happy with an install oracle jdk - in this case for octave but should work for others too
#!/bin/bash
# deps:
# - have oracle jdk >= 7 build with java-package
# see https://wiki.debian.org/JavaPackage if you don't know how
# - apt-get install equivs
#
# Debian actually kind of suggests it but the doc ist kind of old:
# https://www.debian.org/doc/manuals/debian-java-faq/ch13.html
#
# inspired by RJ <[email protected]>
# https://gist.github.com/RJ/94c8b37908c331093fcc
for NAME in default-jre default-jre-headless openjdk-7-jre-headless; do
echo "Section: interpreters
Priority: optional
Standards-Version: 3.6.2
Package: $NAME
Version: 1:99
Maintainer: ben <[email protected]>
Provides: $NAME
Description: fake $NAME package
to pretend $NAME is installed for apts sake (we use oracle pkgs)" > $NAME
equivs-build $NAME
echo -e "\nRUN: dpkg -i ./$NAME*.deb\n"
done
echo "-----------"
echo "now run the printed dpkg -i commands and install octave"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment