Skip to content

Commit

Permalink
Add extrainst_ and postrm
Browse files Browse the repository at this point in the history
Not actually tested, because I'm too tired tonight to try setting up a
real repository (as opposed to dpkg -i).
  • Loading branch information
comex committed Mar 2, 2015
1 parent 7f24621 commit 1c1c09d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
File renamed without changes.
14 changes: 14 additions & 0 deletions darwin-bootstrap/DEBIAN/extrainst_
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions darwin-bootstrap/DEBIAN/postrm
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions script/gen-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c1c09d

Please sign in to comment.