Skip to content

Instantly share code, notes, and snippets.

@evanchooly
Created April 4, 2014 19:13
Show Gist options
  • Save evanchooly/9981291 to your computer and use it in GitHub Desktop.
Save evanchooly/9981291 to your computer and use it in GitHub Desktop.
#! /bin/sh
M=META-INF/MANIFEST.MF
mkdir tmp
cd tmp
cp ../$1 .
JAR=$1
jar xf ${JAR}
sed -e '/Main-Class/d' ${M} >> ${M}.new
mv ${M}.new ${M}
jar cvfm ${JAR} ${M}
mv ${JAR} ..
cd ..
rm -r tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment