Bug #809
Add shebang to bash scripts
Status: | Closed | Start date: | 2015-11-05 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | - | |||
Target version: | Candidate for next minor release | |||
Affected version: | 5.2-svn | Platform: |
Description
The gmt_links.sh
& gmt_uninstall.sh
scripts don't have a shebang, but are expected to be executed as bash scripts.
This caused executable-not-elf-or-script lintian issues for the Debian package build.
The attached patch fixes the issue.
History
#1
Updated by Paul over 5 years ago
- Status changed from New to Resolved
- Assignee set to Paul
- % Done changed from 0 to 100
Thanks, fixed in r15170.
#2
Updated by Paul over 5 years ago
Should a similar fix be applied to share/tools/gmt_completion.bash?
I added #!/bin/csh to the two cshell scripts. OK?
#3
Updated by Florian over 5 years ago
Should a similar fix be applied to share/tools/gmt_completion.bash?
I added #!/bin/csh to the two cshell scripts. OK?
No, you must not add the shebang to any script that has to be sourced and changes the environment of the current shell. With the shebang a subshell is started and you would break the feature.
#4
Updated by Paul over 5 years ago
OK, gmt_completion.bash was left alone. How about the csh scripts - OK to have them include #!/bin/csh?
#5
Updated by Florian over 5 years ago
How about the csh scripts - OK to have them include #!/bin/csh?
Which ones do you mean?
#6
Updated by Remko over 5 years ago
I think Paul referred to ./share/tools/gmt_aliases.csh
That too is a file that needs to be sourced, so no shebang.
Fixed in r15208