kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 6028a3edc31f6fb21abdef1ec2a97a483bec035c
parent 190315c23802569abc04b6d623149edb7a79923e
Author: Joris Vink <joris@coders.se>
Date:   Tue, 15 Oct 2013 14:54:02 +0200

Get rid of some bash-ism and do stuff ourselves.

Diffstat:
modules/example/build.sh | 20+++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/modules/example/build.sh b/modules/example/build.sh @@ -27,23 +27,21 @@ CFLAGS="-I. -I${KORE_DIR}/includes -Wall -Wstrict-prototypes \ LDFLAGS=-shared MODULE_BUILD_DATE=`date +"%Y-%m-%d %H:%M:%S"` -# Functions used in the build process. -function create_and_empty_dir { - if [ ! -d $1 ]; then - mkdir $1; - fi - - rm -f $1/* -} - ### Begin building #### echo "Building module ${MODULE}..." rm -f ${MODULE} ${CC} ${CFLAGS} tools/inject.c -o tools/inject -create_and_empty_dir ${SOURCE_DIR}/${MEDIA_DIR} -create_and_empty_dir .objs +if [ ! -d ${SOURCE_DIR}/${MEDIA_DIR} ]; then + mkdir ${SOURCE_DIR}/${MEDIA_DIR}; +fi +rm -f ${SOURCE_DIR}/${MEDIA_DIR}/* + +if [ ! -d .objs ]; then + mkdir .objs; +fi +rm -f .objs/* rm -f static.h