From f8015b735ab1c9952179ad2405ff8c91a54d2ca1 Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 20 Nov 2016 17:41:52 +0100 Subject: [PATCH] Rendered merge BSD compatible --- dev/merge.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/merge.sh b/dev/merge.sh index 7ed09fa..994e635 100755 --- a/dev/merge.sh +++ b/dev/merge.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -## MERGE 2016090601 +## MERGE 2016112001 ## Merges ofunctions.sh and n_program.sh into program.sh ## Adds installer @@ -76,8 +76,10 @@ function CleanDebug { # s/.*\n// # delete the part before pattern2 #} #p +# sed -n '/'$PARANOIA_DEBUG_BEGIN'/{p; :a; N; /'$PARANOIA_DEBUG_END'/!ba; s/.*\n//}; p' debug_$PROGRAM.sh | grep -v "$PARANOIA_DEBUG_LINE" > ../$PROGRAM.sh - sed -n '/'$PARANOIA_DEBUG_BEGIN'/{p; :a; N; /'$PARANOIA_DEBUG_END'/!ba; s/.*\n//}; p' debug_$PROGRAM.sh | grep -v "$PARANOIA_DEBUG_LINE" > ../$PROGRAM.sh + # Way simpler version of the above, compatible with BSD + sed '/'$PARANOIA_DEBUG_BEGIN'/,/'$PARANOIA_DEBUG_END'/d' debug_$PROGRAM.sh | grep -v "$PARANOIA_DEBUG_LINE" > ../$PROGRAM.sh if [ $? != 0 ]; then QuickLogger "Cannot remove PARANOIA_DEBUG code from standard build." "stdout" exit 1