Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roslisp: avoid /bin/bash #8

Closed
130s opened this issue Jan 9, 2013 · 0 comments · Fixed by #33
Closed

roslisp: avoid /bin/bash #8

130s opened this issue Jan 9, 2013 · 0 comments · Fixed by #33

Comments

@130s
Copy link
Member

130s commented Jan 9, 2013

Migrated from https://code.ros.org/trac/ros/ticket/3771
Reported by: kruset Owned by: bhaskara
Priority: minor
Last modified ago: Nov 2011


As per ticket #3763 (https://code.ros.org/trac/ros/ticket/3763), I suggest the following change. Please look over the patch as there was a #! /bin/bash in the middle of a script file, and I want to be sure that it really had no business there.

Index: scripts/make_node_exec
===================================================================
--- scripts/make_node_exec      (revision 15383)
+++ scripts/make_node_exec      (working copy)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! /usr/bin/env bash

 SBCL_CMD=`rospack find sbcl`/scripts/run-sbcl.sh
 if [[ $# == 4 ]]; then
@@ -8,7 +8,7 @@
   output=$4
   $SBCL_CMD --noinform --end-runtime-options --userinit `rospack find roslisp`/scripts/roslisp-sbcl-init --noprint --disable-debugger --load `rospack find roslisp`/scripts/make-roslisp-exec.lisp $pkg $system $entry $output.lisp || exit $?
   cat > $output <<EOF
-#!/bin/bash
+
 ROSLISP_CURRENT_PACKAGE=$pkg \`\$ROS_ROOT/bin/rospack find sbcl\`/scripts/run-sbcl.sh --noinform --end-runtime-options --noprint --no-userinit --disable-debugger --load $output.lisp --end-toplevel-options \$*
 EOF
   chmod a+x $output
Index: scripts/make_roslisp_image
===================================================================
--- scripts/make_roslisp_image  (revision 15383)
+++ scripts/make_roslisp_image  (working copy)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#! /usr/bin/env bash

Changed 14 months ago by bhaskara

Replacing the initial shebang with env bash is good. The #! in the middle of the script is because the script writes out another script. So that middle one should also just be replaced by #!/usr/bin/env bash (though I suppose in this case, the default of sh will work fine).

@gaya- gaya- mentioned this issue Oct 21, 2016
@gaya- gaya- closed this as completed in #33 Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant