kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 765214c5dcf9ae1dae8f9056bb50769edc6e428d
parent c30ff58b93a617ed3037bfc8e6de69664cb84a47
Author: Joris Vink <joris@coders.se>
Date:   Wed, 23 Oct 2013 22:58:15 +0200

Update build.sh

Diffstat:
modules/skeleton/build.sh | 22++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/modules/skeleton/build.sh b/modules/skeleton/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (c) 2013 Joris Vink <joris@coders.se> # @@ -31,23 +31,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