Consolidate compilation and copy code.
This commit is contained in:
parent
a799374399
commit
60c6cb3bcd
10
isidore.sh
10
isidore.sh
@ -184,8 +184,10 @@ function build_project()
|
|||||||
mkdir -p $OUTPUT_DIR/${i:${#SOURCE_DIR}}
|
mkdir -p $OUTPUT_DIR/${i:${#SOURCE_DIR}}
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in $(find $SOURCE_DIR -name '*.php' -not -name '*.cfg.php')
|
for i in $(find site -type f -regextype posix-extended -not -regex '.*\.(cfg|CFG)\.(php|PHP)')
|
||||||
do
|
do
|
||||||
|
if [[ $i =~ .*\.(php|PHP) ]]
|
||||||
|
then
|
||||||
: ${i:${#SOURCE_DIR}}
|
: ${i:${#SOURCE_DIR}}
|
||||||
local OUT_FILE="$OUTPUT_DIR/${_: :-4}"
|
local OUT_FILE="$OUTPUT_DIR/${_: :-4}"
|
||||||
if [ $1 == 1 ]
|
if [ $1 == 1 ]
|
||||||
@ -193,16 +195,14 @@ function build_project()
|
|||||||
echo "Building $OUT_FILE ..."
|
echo "Building $OUT_FILE ..."
|
||||||
fi
|
fi
|
||||||
cat $PROJECT_CONFIG_FILE $i | php > $OUT_FILE
|
cat $PROJECT_CONFIG_FILE $i | php > $OUT_FILE
|
||||||
done
|
else
|
||||||
|
|
||||||
for i in $(find $SOURCE_DIR -type f -not -name '*.php')
|
|
||||||
do
|
|
||||||
local OUT_FILE="$OUTPUT_DIR/${i:${#SOURCE_DIR}}"
|
local OUT_FILE="$OUTPUT_DIR/${i:${#SOURCE_DIR}}"
|
||||||
if [ $1 == 1 ]
|
if [ $1 == 1 ]
|
||||||
then
|
then
|
||||||
echo "Copying $OUT_FILE ..."
|
echo "Copying $OUT_FILE ..."
|
||||||
fi
|
fi
|
||||||
cp $i $OUT_FILE
|
cp $i $OUT_FILE
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user