From 5d1ae8c08688fce349dd789e535091672ac59b65 Mon Sep 17 00:00:00 2001 From: Christian Starkjohann Date: Sun, 8 Jan 2012 22:59:04 +0100 Subject: GIT migration: create empty directory in script --- examples/hid-custom-rq/make-files.sh | 6 ++---- make-all.sh | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100755 make-all.sh diff --git a/examples/hid-custom-rq/make-files.sh b/examples/hid-custom-rq/make-files.sh index 8e4feb6..74c9c82 100755 --- a/examples/hid-custom-rq/make-files.sh +++ b/examples/hid-custom-rq/make-files.sh @@ -12,10 +12,7 @@ if [ "$1" = remove ]; then rm -f firmware/usbconfig.h rm -rf firmware/usbdrv rm -f firmware/Makefile - rm -f commandline/set-led.c - rm -f commandline/Makefile.windows - rm -f commandline/Makefile - rm -f commandline/opendevice.[ch] + rm -rf commandline exit fi @@ -42,6 +39,7 @@ s/^# Project: .*$/# Project: hid-custom-rq example/g p EOF +mkdir commandline 2>/dev/null cat << \EOF | sed -n -f /dev/stdin ../custom-class/commandline/set-led.c >commandline/set-led.c /^\( [*] \)\{0,1\}[+].*$/ d s/^ [*] Project: .*$/ * Project: hid-custom-rq example/g diff --git a/make-all.sh b/make-all.sh new file mode 100755 index 0000000..f797060 --- /dev/null +++ b/make-all.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Author: Christian Starkjohann +# Creation Date: 2008-04-17 +# Tabsize: 4 +# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH +# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) +# This Revision: $Id$ + +if [ "$2" = windows ]; then + find . -mindepth 2 -name Makefile.windows -exec sh -c "cd \`dirname {}\`; cross-make.sh $1" \; +else + find . -mindepth 2 -name Makefile -print | while read i; do + dir=`dirname $i` + dirname=`basename $dir` + ( + cd $dir + if [ "$dirname" = "firmware" -a -z "$1" ]; then + make hex + else + make $1 + fi + ) + done +fi -- cgit v1.2.3