From 23e60bd6ffdd7eabacf299c956569563e284138a Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 7 Jul 2014 15:42:34 +0900 Subject: [PATCH] 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. --- src/modules/evas/engines/gl_common/shader/compile.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/evas/engines/gl_common/shader/compile.sh b/src/modules/evas/engines/gl_common/shader/compile.sh index fade478ddc..3ce2d5cfd3 100755 --- a/src/modules/evas/engines/gl_common/shader/compile.sh +++ b/src/modules/evas/engines/gl_common/shader/compile.sh @@ -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 }