From b11bff7af7cd05915e50449a15919295009f616a Mon Sep 17 00:00:00 2001 From: Adriana Draghici Date: Tue, 27 Oct 2009 12:06:25 +0200 Subject: [PATCH] tribler-mod: Added script that modifies Tribler's sources setting DEBUG to True/False. Signed-off-by: Adriana Draghici --- tribler-mod/scrips/set_DEBUG.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 tribler-mod/scrips/set_DEBUG.sh 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 -- 2.20.1