forked from mxmlnkn/rootbeer1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpack-rootbeer
executable file
·18 lines (17 loc) · 1.2 KB
/
pack-rootbeer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
if command -v 'zipmerge' 2>&1 1>/dev/null; then
echo -e '\nPack: Rootbeer.jar'
if [ -f Rootbeer.jar ]; then
rm Rootbeer.jar
fi
# Note: does not work for files with spaces in it
time -p zipmerge Rootbeer.jar $(find lib -maxdepth 1 -type f) dist/Rootbeer1.jar
# Rootbeer.jar is for compiling and RootbeerRuntime.jar
# needs to be added to the compiled jar
cp Rootbeer.jar RootbeerRuntime.jar
zip --delete RootbeerRuntime.jar 'antlr/*' 'org/antlr/*' 'org/objectweb/*' 'org/xmlpull/*' 'test/*' 'android/*' 'org/apache/*' 'org/jf/*' 'com/google/*' 'org/hamcrest/*' 'com/thoughtworks/*' 'jasmin/*' 'jas/*' 'scm/*' 'polyglot/*' 'ppg/*' 'java_cup/*' 'soot/*' 'ds/tree/*' 'org/trifort/rootbeer/compiler/*' 'org/trifort/rootbeer/test/*' 'org/trifort/rootbeer/testcases/*' 'org/trifort/rootbeer/entry/*' 'org/trifort/rootbeer/generate/*' 'org/trifort/rootbeer/compressor/*' 'org/trifort/rootbeer/deadmethods/*' 2>&1 1>/dev/null
# What should remain is com/lmax and org/trifort/rootbeer/{configuration,runtime,runtimegou,util}
# 14M Rootbeer.jar -> 406K RootbeerRuntime.jar
else
time -p java -jar lib/pack.jar -mainjar dist/Rootbeer1.jar -directory lib -destjar Rootbeer.jar
fi