forked from desktop/desktop
-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from bb441db/linux
Post install & remove for debian package
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ linux: | |
- AppImage | ||
maintainer: 'GitHub, Inc <[email protected]>' | ||
deb: | ||
afterInstall: './script/linux-after-install.sh' | ||
afterRemove: './script/linux-after-remove.sh' | ||
depends: | ||
# default Electron dependencies | ||
- gconf2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
PROFILE_D_FILE="/etc/profile.d/${productFilename}.sh" | ||
INSTALL_DIR="/opt/${productFilename}" | ||
SCRIPT="#!/bin/sh | ||
export PATH=$INSTALL_DIR:\$PATH" | ||
|
||
case "$1" in | ||
configure) | ||
echo "$SCRIPT" > ${PROFILE_D_FILE}; | ||
. ${PROFILE_D_FILE}; | ||
;; | ||
|
||
abort-upgrade|abort-remove|abort-deconfigure) | ||
;; | ||
|
||
*) | ||
echo "postinst called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
PROFILE_D_FILE="/etc/profile.d/${productFilename}.sh" | ||
|
||
case "$1" in | ||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) | ||
echo "#!/bin/sh" > ${PROFILE_D_FILE}; | ||
. ${PROFILE_D_FILE}; | ||
rm ${PROFILE_D_FILE}; | ||
;; | ||
|
||
*) | ||
echo "postrm called with unknown argument \`$1'" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
exit 0 |