Evas gl: Fix path resolution in compile.sh

Let's make compile.sh work from anywhere (not just from its
containing directory). Also fix problem with calling make-c-str.sh
without setting PATH.
This commit is contained in:
Jean-Philippe Andre 2014-07-07 15:42:34 +09:00
parent d929151458
commit 23e60bd6ff
1 changed files with 8 additions and 4 deletions

View File

@ -1,16 +1,20 @@
#!/bin/bash
DIR=`dirname $0`
MAKESTR="sh $DIR/make-c-str.sh"
function compile()
{
F=$1
F="$DIR/$1"
if [ -f $F".shd" ]; then
make-c-str.sh $F".shd" > $F".h"
$MAKESTR $F".shd" > $F".h"
fi
if [ -f $F"_frag.shd" ]; then
make-c-str.sh $F"_frag.shd" > $F"_frag.h"
$MAKESTR $F"_frag.shd" > $F"_frag.h"
fi
if [ -f $F"_vert.shd" ]; then
make-c-str.sh $F"_vert.shd" > $F"_vert.h"
$MAKESTR $F"_vert.shd" > $F"_vert.h"
fi
}