-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuildv2.sh
More file actions
executable file
·49 lines (45 loc) · 1.01 KB
/
Copy pathbuildv2.sh
File metadata and controls
executable file
·49 lines (45 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
rm -rf "bin"
mkdir "bin"
cp -r "src" "bin/src"
cp -r "res" "bin/res"
cp "Application Descriptor" "bin/Application Descriptor"
cp "proguard.cfg" "bin/proguard.cfg"
cp ".classpath" "bin/.classpath"
cd bin || exit
if [[ ${RELEASE} == "1" ]]
then
echo Filtering sid data...
for file in `find ./ -type f -name "*.java"`
do
if grep -q "??sidonly" "$file"
then
rm "$file"
else
cat "$file" | grep -v "?sid" > ./temp.txt
cat ./temp.txt > "$file"
fi
done
for file in `find ./ -type f -name "*.java"`
do
if grep -q "??dbgonly" $file
then
rm "$file"
else
cat "$file" | grep -v "GL.Log" | grep -v "nmania.GL" | grep -v "?dbg" > ./temp.txt
cat ./temp.txt > "$file"
fi
done
rm ./temp.txt
jarname="nmania_obf.jar"
kembuild --obf
else
echo -en "Commit: " >> "Application Descriptor"
git rev-parse --short HEAD >> "Application Descriptor"
jarname="nmania_sid.jar"
kembuild
fi
cd ..
mv bin/deployed/bin.jar "$jarname"
rm -rf "bin"
mkdir "bin"