Mercurial > hg > beaglert
diff scripts/.bela_common @ 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 | 2b09be3fb0f2 |
children | 03b511d99f3d |
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