head	1.2;
access;
symbols
	SHTOOL_2_0_8:1.2
	SHTOOL_2_0_7:1.1
	SHTOOL_2_0_6:1.1
	SHTOOL_2_0_5:1.1
	SHTOOL_2_0_4:1.1
	SHTOOL_2_0_3:1.1
	SHTOOL_2_0_2:1.1
	SHTOOL_2_0_1:1.1
	SHTOOL_2_0_0:1.1
	SHTOOL_2_0b3:1.1
	SHTOOL_2_0b2:1.1
	SHTOOL_2_0b1:1.1
	SHTOOL_1_6:1.1.0.2
	SHTOOL_1_6_2:1.1
	SHTOOL_1_6_1:1.1
	SHTOOL_1_6_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2008.04.02.20.12.04;	author rse;	state Exp;
branches;
next	1.1;
commitid	xd2Jq3h5PA50DzXs;

1.1
date	2002.02.01.14.58.04;	author rse;	state Exp;
branches;
next	;


desc
@@


1.2
log
@remove trailing spaces
@
text
@#!/bin/sh
##
##  devtool -- Development Tool
##  Copyright (c) 2001 Ralf S. Engelschall <rse@@engelschall.com>
##

if [ $# -eq 0 ]; then
    echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
    exit 1
fi

cmd="$1"
shift

devtoolfunc="./devtool.func"

if [ ! -f devtool.conf ]; then
    echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
    exit 1
fi

cmdline=`grep "^%$cmd" devtool.conf`
if [ ".$cmdline" = . ]; then
    echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
    exit 1
fi

if [ ".$TMPDIR" != . ]; then
    tmpdir="$TMPDIR"
elif [ ".$TEMPDIR" != . ]; then
    tmpdir="$TEMPDIR"
else
    tmpdir="/tmp"
fi
tmpfile="$tmpdir/rc.$$.tmp"

rm -f $tmpfile
touch $tmpfile
echo ". $devtoolfunc" >>$tmpfile
( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
  sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
sed -e 's;\([ 	]\)@@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile

sh $tmpfile "$@@"

rm -f $tmpfile >/dev/null 2>&1 || true

@


1.1
log
@switch to devtool environment
@
text
@d4 1
a4 1
##  Copyright (c) 2001 Ralf S. Engelschall <rse@@engelschall.com> 
@

