diff --git a/private/Each.sh b/private/Each.sh index d3923d5..33861d9 100644 --- a/private/Each.sh +++ b/private/Each.sh @@ -6,6 +6,8 @@ # @category CLI # @version 2.0 +PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + if [ $1 ] then # Explode the first param by delimiter / @@ -15,7 +17,7 @@ then # Run TASK ACTION, it should return IDS eg. 1 5 7 13 # Generated by echo implode(' ', array(1, 5, 7, 13)); - IDS=(`php index.php $TASK $ACTION`) + IDS=(`/usr/bin/php $PATH/index.php $TASK $ACTION`) fi if [ $2 ] @@ -31,7 +33,7 @@ then # Foreach IDS run TASK2 ACTION2 ID for ID in "${IDS[@]}" do - OUTPUT=`php index.php $TASK2 $ACTION2 $ID` + OUTPUT=`/usr/bin/php $PATH/index.php $TASK2 $ACTION2 $ID` # If debug is specified display OUTPUT if [ "$3" == "debug" ]