From 4480ce022d69a8a22396b83129d4059259472b0b Mon Sep 17 00:00:00 2001 From: david Date: Fri, 11 Jul 2008 20:52:17 +0000 Subject: [PATCH] Adjust licformat.sh to allow running it from a directory other than mswin32. --- mswin32/license-format/licformat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mswin32/license-format/licformat.sh b/mswin32/license-format/licformat.sh index ef9ffec6a..f5436ff1f 100755 --- a/mswin32/license-format/licformat.sh +++ b/mswin32/license-format/licformat.sh @@ -1,6 +1,8 @@ #!/bin/bash -sed -f ./license-format/licsed_1 $1 | tr '\n' ' '| awk 'NR==1{printf("\n%s", $0) }' | +script_dir=`dirname $0` + +sed -f $script_dir/licsed_1 $1 | tr '\n' ' '| awk 'NR==1{printf("\n%s", $0) }' | awk '{for (i=1&&j=2; i <= NF; i++&&j++) if($i=="SDFGHJdblnewline"){printf("\n\n")} else if($i=="oSDFGHbullet"){printf(" \no ")} @@ -9,4 +11,4 @@ else if($i=="author" && $j=="Gnomovision"){printf("author\n")} else if($i=="1989" && $j== "Ty"){printf("1989\n")} else{printf("%s ",$i)}}' | -sed -f ./license-format/licsed_2 +sed -f $script_dir/licsed_2