File: make_node_exec

package info (click to toggle)
ros-roslisp 1.9.24-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 820 kB
  • sloc: lisp: 5,271; python: 632; xml: 511; sh: 192; makefile: 48
file content (42 lines) | stat: -rwxr-xr-x 1,051 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env sh

SBCL_CMD="/usr/bin/env sbcl"

ROSLISP_PATH=`rospack find roslisp`
if [ -z "$ROSLISP_PATH" ]; then
  echo "roslisp not found"
  exit 1
fi

if [ $# = 4 ]; then
  pkg=$1
  system=$2
  entry=$3
  output=$4
  echo "Generating Lisp executable."
  $SBCL_CMD --noinform --end-runtime-options --noprint --non-interactive \
            --load $ROSLISP_PATH/scripts/roslisp-sbcl-init \
            --load $ROSLISP_PATH/scripts/make-roslisp-exec.lisp \
                   $pkg $system $entry $output.lisp \
            --script \
      || exit $?
  cat > $output <<EOF
#!/usr/bin/env sh

SBCL_CMD="/usr/bin/env sbcl"

ROSLISP_PATH=\`rospack find roslisp\`
if [ -z "\$ROSLISP_PATH" ]; then
  echo "roslisp not found"
  exit 1
fi

ROSLISP_CURRENT_PACKAGE=$pkg

$SBCL_CMD --noinform --end-runtime-options --noprint --no-userinit --disable-debugger --load \$ROSLISP_PATH/scripts/roslisp-sbcl-init --load $output.lisp --end-toplevel-options \$*
EOF
  chmod a+x $output
else
  echo "Usage: make_node_exec <pkg> <system> <entry> <output>"
  exit 1
fi