From 03e123528df6316e574a503237e1b9a9c1628da1 Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期四, 14 一月 2021 14:32:18 +0800
Subject: [PATCH] update build.sh

---
 build.sh |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/build.sh b/build.sh
index fcb3286..772ddf4 100755
--- a/build.sh
+++ b/build.sh
@@ -1,21 +1,38 @@
 #! /bin/bash
 
-[ -d build ] || mkdir build
-# rm -rf build/*
-cd build
- 
 BUILD_TYPE="Debug"
+
+function usage() {
+	echo "build.sh [release | debug]"
+}
 
 case ${1} in
   "release")
   BUILD_TYPE="Release"
   ;;
   
+  "debug")
+  BUILD_TYPE="Debug"
+  ;;
+
+  "")
+  BUILD_TYPE="Debug"
+  ;;
+  
   *)
- 	BUILD_TYPE="Debug"
+  echo "Invalid Argument."
+ 	usage
   ;;
 esac
 
+
+[ -d build ] || mkdir build
+# rm -rf build/*
+cd build
+ 
+
+
+
 # -DCMAKE_BUILD_TYPE=Debug  | Release
 # -DBUILD_SHARED_LIBS=ON
 # -DCMAKE_INSTALL_PREFIX=$(pwd/../dest)

--
Gitblit v1.8.0