File: confwrapper

package info (click to toggle)
canna 3.7p3-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,220 kB
  • ctags: 9,776
  • sloc: ansic: 85,928; sh: 2,777; yacc: 403; cpp: 389; lex: 379; makefile: 74; awk: 7
file content (45 lines) | stat: -rwxr-xr-x 741 bytes parent folder | download | duplicates (8)
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
43
44
45
#! /bin/sh
# $Id: confwrapper,v 1.4.2.4 2004/05/19 15:39:22 aida_s Exp $
# vim: set sw=2 ts=8:

set -e
case "$1" in
  run)
  shift
  if test ! -f cwenv.sh; then
    make cwenv.sh
  fi
  . ./cwenv.sh
  if test -f cwlocal.sh; then
    . ./cwlocal.sh
  fi
  export CPPFLAGS CC CFLAGS
  echo "CPPFLAGS=\"$CPPFLAGS\""
  echo "CC=\"$CC\""
  echo "CFLAGS=\"$CFLAGS\""
  echo "$@"
  exec "$@"
  ;;

  mkenv)
  envname="$2"
  shift
  shift
  for p in "$@"; do
    case "$p" in
      *" "*|*" 	"*|*"'"*|*'"'*)
      echo 'confwrapper: warning: removing "'"$p"'" from '"$envname" >&2
      ;;
      *) args=$args${args+" "}$p ;;
    esac
  done
  cat << EOF
$envname="$args"
EOF
  ;;

  *)
  echo "confwrapper.sub: Bad argument" >&2
  exit 1
  ;;
esac