Blame batch/repair_apple_bugs.sh

093028b
#!/bin/sh
093028b
093028b
# This file is free software; the Free Software Foundation    
093028b
# gives unlimited permission to copy, distribute and modify it.
093028b
093028b
DIRNAME=`dirname $0`
093028b
export FILE_TO_PATCH=$DIRNAME/../desktop/macosx/white_dune.app/Contents/MacOS/white_dune
093028b
strings $FILE_TO_PATCH | awk -v perldir=$DIRNAME -v patchfile=$FILE_TO_PATCH '
093028b
function findname(f)
093028b
{
093028b
slashs=split(f,a,"/");
093028b
ret="";
093028b
for (i=2;i<=slashs;i++)
093028b
   ret = ret "/" a[i];
093028b
return ret;
093028b
}
093028b
/MyDocument.ob/ { print "perl " perldir "/bin_gsub.pl " patchfile " " findname($1) " ./MyDocument.ob" }
093028b
/main.ob/ { print "perl  " perldir "/bin_gsub.pl " patchfile " " findname($1) " ./main.ob" } 
093028b
' | sh
093028b