summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefile1
-rwxr-xr-xpreinst20
2 files changed, 21 insertions, 0 deletions
diff --git a/makefile b/makefile
index 9673241..70fa990 100644
--- a/makefile
+++ b/makefile
@@ -153,6 +153,7 @@ debs/cydia_$(version)_iphoneos-arm.deb: MobileCydia $(images) $(shell find Mobil
mkdir -p _/DEBIAN
./control.sh _ >_/DEBIAN/control
+ cp -a preinst _/DEBIAN/
find _ -exec touch -t "$$(date -j -f "%s" +"%Y%m%d%H%M.%S" "$$(git show --format='format:%ct' | head -n 1)")" {} ';'
diff --git a/preinst b/preinst
new file mode 100755
index 0000000..86a4a25
--- /dev/null
+++ b/preinst
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+declare -a cydia
+cydia=($CYDIA)
+
+if [[ $1 == upgrade ]]; then
+ if [[ ${CYDIA+@} ]]; then
+ if [[ ${cydia[1]} -lt 1 ]]; then
+ echo 'PLEASE RESTART CYDIA!'
+ echo 'PLEASE RESTART CYDIA!'
+ echo 'PLEASE RESTART CYDIA!'
+ else
+ eval "echo 'finish:reopen' >&${cydia[0]}"
+ fi
+ fi
+
+ echo >/tmp/.cydia.fw
+fi
+
+exit 0