File: noscript

package info (click to toggle)
noweb 2.13-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,540 kB
  • sloc: sh: 2,580; ansic: 1,829; makefile: 903; perl: 781; lisp: 757; awk: 174; csh: 3
file content (15 lines) | stat: -rwxr-xr-x 255 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

SCRIPT="$1"; shift
INTERP=`sed -ne '
   s!/bin/sh!/bin/sh -s!;
   1s/^%!//p
   ' "$SCRIPT"`

case "$INTERP" in
   '')
      echo 'No interpreter line (%!) found!' >&2
      exit 1
      ;;
   *) notangle "$SCRIPT" | exec $INTERP - "$@" ;;
esac