Adjust licformat.sh to allow running it from a directory other than mswin32.

This commit is contained in:
david 2008-07-11 20:52:17 +00:00
parent 1b9b15f45a
commit 4480ce022d

View file

@ -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