forked from Zackptg5/Init.d-Injector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
27 lines (25 loc) · 741 Bytes
/
uninstall.sh
File metadata and controls
27 lines (25 loc) · 741 Bytes
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
if $SYSOVER || $DIRSEPOL; then
rm -f $INFO; mount -o rw,remount /system
[ -L /system/vendor ] && mount -o rw,remount /vendor
fi
FILE=$INFO
[ -f $MODPATH/$MODID-files ] && FILE=$MODPATH/$MODID-files
if [ -f $FILE ]; then
while read LINE; do
if [ "$(echo -n $LINE | tail -c 1)" == "~" ] || [ "$(echo -n $LINE | tail -c 9)" == "NORESTORE" ]; then
continue
elif [ -f "$LINE~" ]; then
mv -f $LINE~ $LINE
else
rm -f $LINE
while true; do
LINE=$(dirname $LINE)
[ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE
done
fi
done < $FILE
fi
if $SYSOVER || $DIRSEPOL; then
rm -f $INFO; mount -o ro,remount /system
[ -L /system/vendor ] && mount -o ro,remount /vendor
fi