-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathformatframework.sh
More file actions
executable file
·44 lines (37 loc) · 1.19 KB
/
formatframework.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.19 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
#!/bin/bash
# Tools for preparing framework dir
# use "./formatframework.sh patch" to prepare framework dir for "make firstpatch"
# use "./formatframework.sh make" to prepare framework dir for "make fullota"
FW1=framework.jar.out
FW2=framework2.jar.out
FW3=secondary-framework.jar.out
mvdir() {
if [ ! -d "$2" ]; then
mkdir -p $2
fi
for file in `ls $1`; do
cp -rf $1/$file $2
echo "$file copied to $2"
done
echo "removing $1 ..."
rm -rf $1
}
if [ $1 = "patch" ]; then
if [ -d ${FW3} ]; then
mv ${FW3} ${FW2}
fi
mvdir "$FW2/smali" "$FW1/smali"
fi
if [ $1 = "make" ]; then
if [ -d ${FW3} ]; then
mv ${FW3} ${FW2}
fi
mvdir "$FW1/smali/android/filterfw" "$FW2/smali/android/filterfw"
mvdir "$FW1/smali/android/filterpacks" "$FW2/smali/android/filterpacks"
mvdir "$FW1/smali/android/gesture" "$FW2/smali/android/gesture"
mvdir "$FW1/smali/android/media/effect" "$FW2/smali/android/media/effect"
mvdir "$FW1/smali/android/media/videoeditor" "$FW2/smali/android/media/videoeditor"
mvdir "$FW1/smali/android/speech/srec" "$FW2/smali/android/speech/srec"
mvdir "$FW1/smali/android/test" "$FW2/smali/android/test"
mvdir "$FW1/smali/com/android/server/sip" "$FW2/smali/com/android/server/sip"
fi