|
From: Gustavo P. B. <gb...@us...> - 2005-04-05 22:49:27
|
Update of /cvsroot/kimageprocess/kimageprocess/src/methods/hsvcm/features In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5220/src/methods/hsvcm/features Added Files: Makefile.am addfeature.sh Log Message: Adding the HSVCM features. They are not implemented yet (too much numbers to take care hehe) --- NEW FILE: Makefile.am --- SUBDIRS = contrast angsecmom correlation entropy --- NEW FILE: addfeature.sh --- #!/bin/bash if [ $# -lt 2 ]; then echo "" echo "Usage:" echo "$0 FeatureName \"Long Feature Name\"" echo "" exit 1 fi NAME="$1" LOWER=`echo $NAME | tr [A-Z] [a-z]` UPPER=`echo $NAME | tr [a-z] [A-Z]` shift LONG="$@" DIR=`dirname $0` if [ "$DIR" = "." ]; then DIR=$PWD fi FILES="Makefile.am LOWER.h LOWER.cpp kimageprocess_hsvcm_LOWER.desktop" cd $DIR rm -rf $LOWER cp -rf dummy $LOWER cd $LOWER rm -rf CVS for file in $FILES; do cat $file | sed "s/NAME/$NAME/g" | sed "s/LOWER/$LOWER/g" | sed "s/UPPER/$UPPER/g" | sed "s/LONG/$LONG/g" > $file.new mv -f $file.new $file done # renaming files mv -f LOWER.h $LOWER.h mv -f LOWER.cpp $LOWER.cpp mv -f kimageprocess_hsvcm_LOWER.desktop kimageprocess_hsvcm_$LOWER.desktop # add the feature to Makefile.am echo "Do you want to add this feature to the Makefile.am (Y/n)?" read CONFIRM if [ ! "$CONFIRM" = "n" -a ! "$CONFIRM" = "N" ]; then cd $DIR # test if the Makefile has more things than just the SUBDIRS line LINES=`cat Makefile.am | grep -v SUBDIRS | wc --lines` if [ $LINES -lt 0 ]; then echo "WARNING: The Makefile I'm going to edit has more things than just the SUBDIRS" echo "Shall I continue (S/n)?" read CONFIRM if [ "$CONFIRM" = "n" -o "$CONFIRM" = "N" ]; then exit 1 fi fi SUBDIRS=`cat Makefile.am | grep SUBDIRS | head -n1` SUBDIRS="$SUBDIRS $LOWER" echo $SUBDIRS > Makefile.am echo "Done." echo "-----" echo "Now you need to run \"make -f Makefile.cvs\" from the top dir" fi |