mirror of
https://github.com/quamotion/dotnet-packaging.git
synced 2026-02-14 21:32:52 +00:00
PostInstallScript and friends adds #!/bin/sh #42
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheAngryByrd on GitHub (Dec 6, 2018).
Currently the PostInstallScript (and others) adds
#!/bin/shto the script.63b290277b/Packaging.Targets/Deb/DebPackageCreator.cs (L176)The way I've been using this is to have MSBuild read in a file from disk that I've specified as the postinstall script. I've already added my shebang to the file, but when I go to deploy it has double them now. I think this should be up the user to add their shebang.
@qmfrederik commented on GitHub (Dec 6, 2018):
The reason
#!/bin/shget added is that other options (such asCreateUserorInstallService) dynamically construct a script, and we add the shebang at the very end to make the script valid.Another way to handle this may be to store the user script "as is" in the package, and invoke it from the PreInstallScript.
@TheAngryByrd commented on GitHub (Dec 6, 2018):
Or would it make sense to have a separate implementation for "inline" scripts and file paths?
@qmfrederik commented on GitHub (Dec 17, 2018):
That may work as well. Would you like for that to override any "auto-generated" script (like for
CreateUserorInstallService)?@TheAngryByrd commented on GitHub (Dec 17, 2018):
Yeah, if I'm providing my own scripts, I should bear the burden of setting up users/services correctly.