From 7315d2cba2d648b7d13678ace4e17e55dcb9e219 Mon Sep 17 00:00:00 2001 From: a-Sansara Date: Mon, 20 Aug 2018 03:07:35 +0200 Subject: [PATCH] permit build one sample --- build.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 8125417..5f0015e 100755 --- a/build.sh +++ b/build.sh @@ -78,7 +78,9 @@ function build.samples() for file in ./samples/*.vala do if [[ -f $file ]]; then - build.sample "$file" + if [ -z "$1" ] || [ "$1" == "$file" ]; then + build.sample "$file" + fi fi done echo -e "\n RESUME : " @@ -104,10 +106,14 @@ function build.sample() # -------------------------------------------------------- function build.main() { + local onefile="" + if [ ! -z "$1" ]; then + onefile="./samples/$1.vala" + fi build.lib if [ $? -eq 0 ]; then - build.samples + build.samples $onefile fi } -build.main +build.main "$1"