]> git.saurik.com Git - winterboard.git/blame - preinst
Fixed UIImages, fixed jitter aliasing, fixed Themes permissions, and massive code...
[winterboard.git] / preinst
CommitLineData
62b2dbad
JF
1#!/bin/bash
2
d5fb6e01
JF
3declare -a cydia
4cydia=($CYDIA)
5
62b2dbad
JF
6if [[ $1 == install ]]; then
7 /usr/libexec/cydia/move.sh /Library/Themes
2acbe5b8 8
d5fb6e01
JF
9 if [[ ${CYDIA+@} ]]; then
10 eval "echo 'finish:restart' >&${cydia[0]}"
11 fi
12elif [[ $1 == upgrade ]]; then
13 if [[ -e /Applications/WinterBoard.app/pledit ]]; then
14 /Applications/WinterBoard.app/pledit /System/Library/LaunchDaemons/com.apple.SpringBoard.plist \
15 -r /Applications/WinterBoard.app/WinterBoard.dylib
16 if [[ ${CYDIA+@} ]]; then
17 eval "echo 'finish:reload' >&${cydia[0]}"
18 fi
19 else
20 if [[ ${CYDIA+@} ]]; then
21 eval "echo 'finish:restart' >&${cydia[0]}"
22 fi
23 fi
62b2dbad
JF
24fi
25
95a5777b 26if [[ $1 == install || $1 == upgrade ]]; then
2acbe5b8
JF
27 chmod 755 /Library/Themes/
28
95a5777b
JF
29 {
30 grep -v ' com\.saurik\.winterboard\.' /etc/notify.conf
31 cat <<EOF
32reserve com.saurik.winterboard. 0 0 rwr-r-
33monitor com.saurik.winterboard.lockbackground /var/mobile/Library/LockBackground.jpg
34EOF
35 } >/etc/notify.conf_ &&
36 mv -f /etc/notify.conf{_,} || rm -f /etc/notify.conf_
37 killall -1 notifyd
38fi
39
62b2dbad 40exit 0