devtool

Thu, 06 Aug 2009 13:21:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 06 Aug 2009 13:21:30 +0200
changeset 15
0e0eb7c91312
permissions
-rwxr-xr-x

Remove seemingly declarations unnecessary according to Qt 4.5.2 headers.

michael@1 1 #! /bin/sh
michael@1 2 ##
michael@1 3 ## devtool -- Development Tool
michael@1 4 ## Copyright (c) 2001-2002 Ralf S. Engelschall <rse@engelschall.com>
michael@1 5 ##
michael@1 6
michael@1 7 if [ $# -eq 0 ]; then
michael@1 8 echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
michael@1 9 exit 1
michael@1 10 fi
michael@1 11
michael@1 12 cmd="$1"
michael@1 13 shift
michael@1 14
michael@1 15 devtoolfunc="./devtool.func"
michael@1 16
michael@1 17 if [ ! -f devtool.conf ]; then
michael@1 18 echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
michael@1 19 exit 1
michael@1 20 fi
michael@1 21
michael@1 22 cmdline=`grep "^%$cmd" devtool.conf`
michael@1 23 if [ ".$cmdline" = . ]; then
michael@1 24 echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
michael@1 25 exit 1
michael@1 26 fi
michael@1 27
michael@1 28 if [ ".$TMPDIR" != . ]; then
michael@1 29 tmpdir="$TMPDIR"
michael@1 30 elif [ ".$TEMPDIR" != . ]; then
michael@1 31 tmpdir="$TEMPDIR"
michael@1 32 else
michael@1 33 tmpdir="/tmp"
michael@1 34 fi
michael@1 35 tmpfile="$tmpdir/as-gui.$$.tmp"
michael@1 36
michael@1 37 rm -f $tmpfile
michael@1 38 touch $tmpfile
michael@1 39 echo ". $devtoolfunc" >>$tmpfile
michael@1 40 ( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
michael@1 41 sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
michael@1 42 sed -e 's;\([ ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile
michael@1 43
michael@1 44 sh $tmpfile "$@"
michael@1 45
michael@1 46 rm -f $tmpfile >/dev/null 2>&1 || true

mercurial