diff options
-rw-r--r-- | darwin-bootstrap/DEBIAN/control (renamed from DEBIAN/control) | 0 | ||||
-rwxr-xr-x | darwin-bootstrap/DEBIAN/extrainst_ | 14 | ||||
-rwxr-xr-x | darwin-bootstrap/DEBIAN/postrm | 16 | ||||
-rwxr-xr-x | script/gen-deb.sh | 4 |
4 files changed, 32 insertions, 2 deletions
diff --git a/DEBIAN/control b/darwin-bootstrap/DEBIAN/control index e6fbe13..e6fbe13 100644 --- a/DEBIAN/control +++ b/darwin-bootstrap/DEBIAN/control diff --git a/darwin-bootstrap/DEBIAN/extrainst_ b/darwin-bootstrap/DEBIAN/extrainst_ new file mode 100755 index 0000000..4d0e495 --- /dev/null +++ b/darwin-bootstrap/DEBIAN/extrainst_ @@ -0,0 +1,14 @@ +#!/bin/bash + +# for now, always reboot on install/uninstall + +# <- http://iphonedevwiki.net/index.php/Packaging#Telling_Cydia_to_respring.2Freboot_etc._after_install +function finish() { + f="${1}" + [[ -z "${f}" || -z "${CYDIA}" ]] && return + cydia=(${CYDIA}) + [[ ${cydia[1]} -eq 1 ]] || return + echo "finish:${f}" >&${cydia[0]} +} + +finish reboot diff --git a/darwin-bootstrap/DEBIAN/postrm b/darwin-bootstrap/DEBIAN/postrm new file mode 100755 index 0000000..5eec6f8 --- /dev/null +++ b/darwin-bootstrap/DEBIAN/postrm @@ -0,0 +1,16 @@ +#!/bin/bash + +# for now, always reboot on install/uninstall + +# <- http://iphonedevwiki.net/index.php/Packaging#Telling_Cydia_to_respring.2Freboot_etc._after_install +function finish() { + f="${1}" + [[ -z "${f}" || -z "${CYDIA}" ]] && return + cydia=(${CYDIA}) + [[ ${cydia[1]} -eq 1 ]] || return + echo "finish:${f}" >&${cydia[0]} +} + +if [[ "$1" == "remove" ]]; then + finish reboot +fi diff --git a/script/gen-deb.sh b/script/gen-deb.sh index 1848a93..f9d2960 100755 --- a/script/gen-deb.sh +++ b/script/gen-deb.sh @@ -20,8 +20,8 @@ mkdir -p $debroot/etc/rc.d ln -s /Library/Substitute/Helpers/inject-into-launchd $debroot/etc/rc.d/substitute mkdir -p $debroot/Library/LaunchDaemons cp darwin-bootstrap/com.ex.substituted.plist $debroot/Library/LaunchDaemons/ -cp -a DEBIAN $debroot/ -sed "s#{VERSION}#$version#g" DEBIAN/control > $debroot/DEBIAN/control +cp -a darwin-bootstrap/DEBIAN $debroot/ +sed "s#{VERSION}#$version#g" darwin-bootstrap/DEBIAN/control > $debroot/DEBIAN/control #... add bootstrap stuff # yay, old forks and deprecated compression fakeroot dpkg-deb -Zlzma -b $debroot out/com.ex.substitute-$version.deb |