comparison scripts/build_project.sh @ 462:d9a4fc5357e7 prerelease

Path-relativeness of scripts has been improved. At least update_board will work when double clicked
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 20 Jun 2016 14:09:43 +0100
parents 86591d203c78
children 8fcfbfb32aa0
comparison
equal deleted inserted replaced
461:26b3b87437fb 462:d9a4fc5357e7
4 # optionally runs it. Pass a directory path in the first argument. 4 # optionally runs it. Pass a directory path in the first argument.
5 # The source files in this directory are copied to the board and compiled. 5 # The source files in this directory are copied to the board and compiled.
6 6
7 # set defaults unless variables are already set 7 # set defaults unless variables are already set
8 8
9 . ./.bela_common || exit 1 9 SCRIPTDIR=$(dirname "$0")
10 [ -z $SCRIPTDIR ] && SCRIPTDIR="./" || SCRIPTDIR=$SCRIPTDIR/
11 . $SCRIPTDIR.bela_common || { echo "You must be in Bela/scripts to run these scripts" | exit 1; }
10 12
11 usage() 13 usage()
12 { 14 {
13 THIS_SCRIPT=`basename "$0"` 15 THIS_SCRIPT=`basename "$0"`
14 echo "Usage: $THIS_SCRIPT [-c command-line-args] [-nbfF] <directory-with-source-files>" 16 echo "Usage: $THIS_SCRIPT [-c command-line-args] [-nbfF] <directory-with-source-files>"