Mercurial > hg > beaglert
changeset 447:86591d203c78 prerelease
Updated scripts to use "." instead of source, for sh compatibility
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 19 Jun 2016 16:33:05 +0100 |
parents | 566bb80c2d14 |
children | fdb30affab1c |
files | scripts/.bela_common scripts/build_pd_heavy.sh scripts/build_project.sh scripts/update_board |
diffstat | 4 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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() {
--- 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"