2008-05-19 00:27:29 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# usege: make_widget LineEdit
|
|
|
|
|
|
|
|
LOWERNAME=`echo $1 | tr [:upper:] [:lower:]`
|
|
|
|
NAME=$1
|
|
|
|
CAPNAME=`echo $3 | tr [:lower:] [:upper:]`
|
|
|
|
NATIVE="Q${NAME}"
|
|
|
|
HEADER="${LOWERNAME}.h"
|
|
|
|
SOURCE="${LOWERNAME}.cpp"
|
|
|
|
BOTH="$HEADER $SOURCE"
|
|
|
|
QHEADER="Q${HEADER}"
|
|
|
|
|
|
|
|
cp template.h $HEADER
|
|
|
|
cp template.cpp $SOURCE
|
|
|
|
|
|
|
|
perl -pi -e "s,<Name>,${NAME},g" $BOTH
|
|
|
|
perl -pi -e "s,<NAME>,${CAPNAME},g" $BOTH
|
|
|
|
perl -pi -e "s,<name>,${LOWERNAME},g" $BOTH
|
|
|
|
perl -pi -e "s,<Native>,$NATIVE,g" $BOTH
|
|
|
|
|
|
|
|
echo "#include ../../plasma/${HEADER}" > ../includes/${NAME}
|
|
|
|
|
2008-05-19 01:11:44 +02:00
|
|
|
svn add ../includes/${NAME} $BOTH
|
2008-05-19 00:27:29 +02:00
|
|
|
|