diff --git a/.gitignore b/.gitignore index 3c49f0f..99ed0d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -build/ notes.txt diff --git a/build.sh b/build.sh index d7d486a..158b548 100755 --- a/build.sh +++ b/build.sh @@ -1,11 +1,13 @@ #!/bin/bash +set -e + absolutize () { if [ ! -d "$1" ]; then echo echo "ERROR: '$1' doesn't exist or not a directory!" - exit -1 + kill -INT $$ fi pushd "$1" >/dev/null @@ -14,6 +16,12 @@ absolutize () } TARGET_PLATFORM=$1 + +if [ -z ${TARGET_PLATFORM} ]; then + echo "Usage: $0 target-platform (e.g. 'TLWDR4300')" + kill -INT $$ +fi + BUILD=`dirname "$0"`"/build/" BUILD=`absolutize $BUILD` IMGTEMPDIR="${BUILD}/openwrt-build-image-extras" diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..5e7d273 --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore