From: Adriana Draghici Date: Tue, 27 Oct 2009 10:06:25 +0000 (+0200) Subject: tribler-mod: Added script that modifies Tribler's sources setting DEBUG to True/False. X-Git-Tag: getopt_long~293 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=b11bff7af7cd05915e50449a15919295009f616a;p=cs-p2p-next.git tribler-mod: Added script that modifies Tribler's sources setting DEBUG to True/False. Signed-off-by: Adriana Draghici --- diff --git a/tribler-mod/scrips/set_DEBUG.sh b/tribler-mod/scrips/set_DEBUG.sh new file mode 100755 index 0000000..b722ae4 --- /dev/null +++ b/tribler-mod/scrips/set_DEBUG.sh @@ -0,0 +1,14 @@ + +if test $# -lt 2 -o \( "-$1" != "-f" -a "-$1" != "-t" \) +then + echo "Usage: ";echo "$0 t - changes DEBUG variable to True for the source files listed in " + echo "$0 f - changes DEBUG variable to False for the source files listed in " +else +# for i in $(cat $2 | grep "/");do echo $i; done; + if test "-$1" == "-t" + then + for i in $(cat $2 | grep "/"); do sed -i.bak 's/DEBUG[ \t]*=[ \t]*False[ \t]*[#a-zA-Z ]*/DEBUG = True #False/g' $i; done; + else + for i in $(cat $2 | grep "/"); do sed -i.bak 's/DEBUG[ \t]*=[ \t]*True[ \t]*[#a-zA-Z ]*/DEBUG = False #True/g' $i; done; + fi +fi