-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodify.sh
executable file
·58 lines (37 loc) · 1.04 KB
/
modify.sh
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
50
51
52
53
54
55
56
57
#!/bin/sh
if [ -e modified-utopic-preinstalled-touch-armhf.tar.gz ]; then
echo "Please remove modified-utopic-preinstalled-touch-armhf.tar.gz!"
exit 1
fi
if [ -e tmp ]; then
echo "Please remove the $(pwd)/tmp directory!"
exit 1
fi
mkdir -p tmp
cd tmp
echo "To preserve file owner of extracting files, you need sudo permission"
echo "extracting files ... "
cp -f ../utopic-preinstalled-touch-armhf.tar.gz .
mkdir targz
cd targz
tar xfz ../utopic-preinstalled-touch-armhf.tar.gz --exclude='dev/*' --same-owner
rm ../utopic-preinstalled-touch-armhf.tar.gz
echo "Overwriting & Updating files ..."
rm -r \
var/cache/apt/pkgcache.bin \
var/cache/apt/srcpkgcache.bin \
var/lib/apt/lists/* \
var/log/lastlog \
usr/share/icons/gnome \
usr/share/icons/Humanity
cp -r ../../replacements/rootfs/* .
cd ..
echo "Compressing files ..."
cd targz
tar cfz ../utopic-preinstalled-touch-armhf.tar.gz *
cd ..
rm -fr ./targz
mv utopic-preinstalled-touch-armhf.tar.gz ../modified-utopic-preinstalled-touch-armhf.tar.gz
cd ../
rm -r tmp/
echo "Completed."