From 6b10f36769d9d87d5e3ca3aabaec2488df1f2093 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期一, 23 十二月 2019 10:34:53 +0800
Subject: [PATCH] update

---
 modulemake.sh |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/modulemake.sh b/modulemake.sh
index 714ac50..b5138f9 100755
--- a/modulemake.sh
+++ b/modulemake.sh
@@ -1,22 +1,30 @@
 #!/bin/sh
 
+target="all"
+
+if [ $# != 0 -a "$1" != "all" ]; then
+    target=$1
+fi
+
 cur_dir=`pwd`
 src=$cur_dir"/libgowrapper"
 
-runtime_dir=$cur_dir"/runtime"
+runtime_dir=$cur_dir"/libs"
 
 # runtime_dir not exist, then create
 if [ ! -d $runtime_dir ];then
     mkdir $runtime_dir 
-    echo "~~~CREATE RUNTIME LIBRARY DIRECTORY"  
-else
-    rm -fr $runtime_dir/*
+    echo "~~~CREATE RUNTIME LIBRARY DIRECTORY $runtime_dir"  
 fi
 
 cd $src
 
 for value in `ls`; do
     if [ ! -d $src"/"$value ];then
+        continue
+    fi
+
+    if [ "$target" != "all" -a "$target" != "$value" ]; then
         continue
     fi
 # build so file
@@ -28,7 +36,7 @@
     fi
 
 # move to runtime_dir
-    cp -fr lib$value.so $runtime_dir
+    mv -f lib$value.so $runtime_dir
 # move sdk to runtime_dir
     if [ -d `pwd`/sdk/lib ]; then
         cp -fr `pwd`/sdk/lib/* $runtime_dir

--
Gitblit v1.8.0