Created
July 16, 2012 21:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAVAPATH=$1 | |
BN=`basename $JAVAPATH` | |
if [ ${BN:0:3} != 'jdk' ] ; then | |
echo "Error, path $JAVAPATH doesnt seem to be a JDK path, which normally starts with 'jdk'" | |
exit 1 | |
fi | |
. ./generate-java-post.sh $BN | |
. ./generate-java-remove.sh $BN | |
VERSION=${BN:3} | |
rm -f dts-java_$VERSION*.rpm | |
rm -f dts-java_$VERSION*.deb | |
for pkgtype in deb rpm ; do | |
fpm -s dir -t $pkgtype --prefix /usr/lib/jvm -p dts-java_${VERSION}_amd64.$pkgtype -n dts-java -v $VERSION --after-install java-post.sh --after-remove java-remove.sh -C `dirname $JAVAPATH` $BN | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment