]> git.saurik.com Git - winterboard.git/blame - preinst
Web Clips, Lock Backgrounds, and glowing StatusBars.
[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
d5fb6e01
JF
8 if [[ ${CYDIA+@} ]]; then
9 eval "echo 'finish:restart' >&${cydia[0]}"
10 fi
11elif [[ $1 == upgrade ]]; then
12 if [[ -e /Applications/WinterBoard.app/pledit ]]; then
13 /Applications/WinterBoard.app/pledit /System/Library/LaunchDaemons/com.apple.SpringBoard.plist \
14 -r /Applications/WinterBoard.app/WinterBoard.dylib
15 if [[ ${CYDIA+@} ]]; then
16 eval "echo 'finish:reload' >&${cydia[0]}"
17 fi
18 else
19 if [[ ${CYDIA+@} ]]; then
20 eval "echo 'finish:restart' >&${cydia[0]}"
21 fi
22 fi
62b2dbad
JF
23fi
24
95a5777b
JF
25if [[ $1 == install || $1 == upgrade ]]; then
26 {
27 grep -v ' com\.saurik\.winterboard\.' /etc/notify.conf
28 cat <<EOF
29reserve com.saurik.winterboard. 0 0 rwr-r-
30monitor com.saurik.winterboard.lockbackground /var/mobile/Library/LockBackground.jpg
31EOF
32 } >/etc/notify.conf_ &&
33 mv -f /etc/notify.conf{_,} || rm -f /etc/notify.conf_
34 killall -1 notifyd
35fi
36
62b2dbad 37exit 0