Skip to content

Use bash in deb templates#1904

Open
mkenigs wants to merge 1 commit intojordansissel:mainfrom
mkenigs:use-bash
Open

Use bash in deb templates#1904
mkenigs wants to merge 1 commit intojordansissel:mainfrom
mkenigs:use-bash

Conversation

@mkenigs
Copy link

@mkenigs mkenigs commented May 18, 2022

Currently, fpm has a bug where if I use #!bash for an --after-install
script that uses bash specific features, it works, but if I add an
--after-upgrade script, the previously working --after-install script
now fails, because the script is now run with sh.

If this change is too opinionated, maybe an alternative fix would be to respect the shebang in the --after-install script?

Currently, fpm has a bug where if I use #!bash for an --after-install
script that uses bash specific features, it works, but if I add an
--after-upgrade script, the previously working --after-install script
now fails, because the script is now run with sh.
@jordansissel
Copy link
Owner

maybe an alternative fix would be to respect the shebang in the --after-install script?

I like this alternate proposal, though I understand the implementation might be trickier.

automatically choosing the right shebang line seems like a good approach. Default to /bin/sh unless a script uses something else. We might need to detect conflicting shebang lines, like if after upgrade and after install have different shebang lines?

@mkenigs
Copy link
Author

mkenigs commented May 20, 2022

Yeah that'd probably be better! Don't think I have time to do it that way right now because I have a workaround for what I'm using it for

@jordansissel
Copy link
Owner

Don't think I have time to do it that way right now

No worries! We can make forward progress as time permits for anyone available to do the work (including myself). For now, I'm glad we could bounce ideas and come up with a solution that should work well, while you at least have a decent work around for yourself. <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants