Bug #809

Add shebang to bash scripts

Added by Bas about 2 years ago. Updated almost 2 years ago.

Status:ClosedStart date:2015-11-05
Priority:NormalDue date:
Assignee:Paul% 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.

shebang.patch Magnifier (548 Bytes) Bas, 2015-11-05 12:35

Associated revisions

Revision 15170
Added by Paul about 2 years ago

Fix issue #809

History

#1 Updated by Paul about 2 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 about 2 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 about 2 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 about 2 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 about 2 years ago

How about the csh scripts - OK to have them include #!/bin/csh?

Which ones do you mean?

#6 Updated by Remko about 2 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

#7 Updated by Paul almost 2 years ago

  • Status changed from Resolved to Closed

Closing this issue.

Also available in: Atom PDF