Skip to content

Commit

Permalink
Attempt to genericize the .deb
Browse files Browse the repository at this point in the history
…so that PulsarNext can be installed alongside Pulsar.
  • Loading branch information
savetheclocktower committed Jan 14, 2025
1 parent f71cb57 commit 590daee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion script/electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ let options = {
compression: 'normal',
deb: {
afterInstall: 'script/post-install.sh',
afterRemove: 'script/post-uninstall.sh'
afterRemove: 'script/post-uninstall.sh',
packageName: baseName
},
rpm: {
afterInstall: 'script/post-install.sh',
Expand Down
17 changes: 13 additions & 4 deletions script/post-install.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
#!/bin/sh

FILESOURCE='/opt/Pulsar/resources/pulsar.sh'
FILEDEST='/usr/bin/pulsar'
FILESOURCE='/opt/${executable}/resources/${executable}.sh'
FILEDEST='/usr/bin/${executable}'

if [ -f "$FILEDEST" ]
then
rm "$FILEDEST"
fi
cp "$FILESOURCE" "$FILEDEST"

SYMLINK_TARGET='/opt/Pulsar/resources/app/ppm/bin/apm'
SYMLINK_PATH='/usr/bin/ppm'
case $executable in
pulsar-next)
ppm_executable=ppm-next
;;
*)
ppm_executable=ppm
;;
esac

SYMLINK_TARGET='/opt/${executable}/resources/app/ppm/bin/${ppm_executable}'
SYMLINK_PATH='/usr/bin/${ppm_executable}'

if [ -L "$SYMLINK_PATH" ]
then
Expand Down

0 comments on commit 590daee

Please sign in to comment.