# HG changeset patch # User Giulio Moro # Date 1466350385 -3600 # Node ID 86591d203c780fa16587b6634442aae39e89eb1d # Parent 566bb80c2d1434d82a6d09617003e6dba32545e2 Updated scripts to use "." instead of source, for sh compatibility diff -r 566bb80c2d14 -r 86591d203c78 scripts/.bela_common --- a/scripts/.bela_common Sun Jun 19 12:43:43 2016 +0100 +++ b/scripts/.bela_common Sun Jun 19 16:33:05 2016 +0100 @@ -11,14 +11,14 @@ trap "echo; exit 0;" 2 9 folder_has_changed(){ - [ -z "$2" ] && { echo "Error: folder_has_changed(folder, reference, [filter])"; exit 1; } + [ -z "$2" ] && { echo "Error: folder_has_changed(folder, reference, [filter])"; return 1; } [ -z "$3" ] && FILTER="." || FILTER="$3" find "$1" -type f -newer "$2" | grep "$FILTER" return $? } wait_for_change(){ - [ -z "$2" ] && { echo "Error: folder_has_changed(folder, reference, [filter])"; exit 1; } + [ -z "$2" ] && { echo "Error: folder_has_changed(folder, reference, [filter])"; return 1; } [ -z "$4" ] && SLEEP=0.5 || SLEEP="$4" while ! folder_has_changed "$1" "$2" "$3" do diff -r 566bb80c2d14 -r 86591d203c78 scripts/build_pd_heavy.sh --- a/scripts/build_pd_heavy.sh Sun Jun 19 12:43:43 2016 +0100 +++ b/scripts/build_pd_heavy.sh Sun Jun 19 16:33:05 2016 +0100 @@ -21,7 +21,8 @@ RUN_WITHOUT_SCREEN=1 BELA_PYTHON27= -source .bela_common || exit 1 +. ./.bela_common || exit 1 + if [ -z "$BELA_PYTHON27" ]; then for PY in python python2.7 ; do python --version 2>&1 | grep "2\.7" >/dev/null 2>&1 diff -r 566bb80c2d14 -r 86591d203c78 scripts/build_project.sh --- a/scripts/build_project.sh Sun Jun 19 12:43:43 2016 +0100 +++ b/scripts/build_project.sh Sun Jun 19 16:33:05 2016 +0100 @@ -6,8 +6,7 @@ # set defaults unless variables are already set -[ -f ".bela_common" ] && echo "loading bela_common" || { echo "Error: cannot find .bela_common . Make sure you run the script from within the scripts/ folder"; exit 1; } -source .bela_common +. ./.bela_common || exit 1 usage() { diff -r 566bb80c2d14 -r 86591d203c78 scripts/update_board --- a/scripts/update_board Sun Jun 19 12:43:43 2016 +0100 +++ b/scripts/update_board Sun Jun 19 16:33:05 2016 +0100 @@ -3,10 +3,10 @@ # This script copies the core Bela files to the BeagleBone Black # in preparation for building projects. It will remove any existing # Bela directory before copying the files over - [ -z "$BBB_ADDRESS" ] && BBB_ADDRESS="root@192.168.7.2" [ -z "$BBB_BELA_HOME" ] && BBB_BELA_HOME="/root/Bela/" -source .bela_common + +. ./.bela_common || exit 1 FILES_TO_COPY="core include Makefile libNE10.a libprussdrv.a examples Doxyfile"