-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathpostinst.rootful
executable file
·46 lines (35 loc) · 949 Bytes
/
postinst.rootful
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
#!/bin/sh
mv() {
command mv "/Library/Application Support/MobileGoose/$1/"* "/Library/MobileGoose/$1/" 2> /dev/null > /dev/null || true
}
finish() {
action="${1}"
# No control fd: bail out
[ -z "${action}" -o -z "${CYDIA}" ] && return
fd_version=
fd=
i=0
for item in ${CYDIA}; do
case "${i}" in
0) fd="${item}";;
1) fd_version="${item}";;
esac
i=$((i+1))
done
# Cydia control fd version != 1: bail out
[ "${fd_version}" -eq 1 ] || return
echo "finish:${action}" >&${fd}
}
case "$1" in
triggered)
echo "MobileGoose mods were changed, requesting a respring..."
finish reload
;;
configure)
mv Memes
mv Notes
rm -rf "/Library/Application Support/MobileGoose/Memes" "/Library/Application Support/MobileGoose/Notes" || true
rmdir "/Library/Application Support/MobileGoose/Mods" 2> /dev/null > /dev/null || true
rmdir "/Library/Application Support/MobileGoose" 2> /dev/null > /dev/null || true
;;
esac