Repository: incubator-singa
Updated Branches:
  refs/heads/master 51a924dad -> 81f7a12eb


add root permission while install in default path


Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/65afb1a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/65afb1a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/65afb1a1

Branch: refs/heads/master
Commit: 65afb1a1c432350e48a5fc2eb5c05b15c3ac557e
Parents: 51a924d
Author: xiezl <[email protected]>
Authored: Wed Jun 17 19:27:44 2015 +0800
Committer: xiezl <[email protected]>
Committed: Wed Jun 17 19:27:44 2015 +0800

----------------------------------------------------------------------
 README.md             |  2 +-
 thirdparty/install.sh | 30 ++++++++++++++++++++----------
 2 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/65afb1a1/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index ce334a5..981e389 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ Here is a table showing the first arguments:
 *: Since czmq depends on zeromq, the script offers you one more argument to 
indicate zeromq location.
 The installation commands of czmq can be:
 
-               $ ./install.sh czmq  /usr/local /usr/local/zeromq
+       $ ./install.sh czmq  /usr/local /usr/local/zeromq
 
 After the execution, czmq will be installed in /usr/local while zeromq is 
installed in /usr/local/zeromq.
 

http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/65afb1a1/thirdparty/install.sh
----------------------------------------------------------------------
diff --git a/thirdparty/install.sh b/thirdparty/install.sh
index 1bb85a1..2b7cfc8 100755
--- a/thirdparty/install.sh
+++ b/thirdparty/install.sh
@@ -14,15 +14,16 @@ function install_cmake()
                then
                        echo "install cmake in $1";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install cmake in default path";
                        ./configure;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -49,19 +50,21 @@ function install_czmq()
                then
                        echo "install czmq in $1 and libzmq path is $2";
                        ./configure --prefix=$1 --with-libzmq=$2;
+                       make && make install;
                elif [ $# == 1 ]
                then
                        echo "install czmq in $1 and libzmq path is default";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install czmq in default path";
                        ./configure;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -85,15 +88,16 @@ function install_gflags()
                then
                        echo "install gflags in $1"
                        cmake .. -DCMAKE_INSTALL_PREFIX=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then 
                        echo "install gflags in default path";
                        cmake ..;
+                       make && sudo make install;
                else
                        echo "gflags is done";
        fi
        
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ../..;
@@ -118,15 +122,16 @@ function install_glog()
                then
                        echo "install glog in $1";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install glog in default path";
                        ./configure;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -150,14 +155,15 @@ function install_lmdb()
                then
                        echo "install lmdb in $1";
                        sed -i "26s#^.*#prefix=$1#g" Makefile;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install lmdb in default path";
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ../../..;
@@ -195,7 +201,7 @@ function install_openblas()
                elif [ $# == 0 ]
                then
                        echo "install cmake in default path";
-                       make install;
+                       sudo make install;
                        if [ $? -ne 0 ]
                        then
                                cd ..;
@@ -223,15 +229,16 @@ function install_opencv()
                then
                        echo "install opencv in $1";
                        cmake -DCMAKE_BUILD_TYPE=RELEASE 
-DCMAKE_INSTALL_PREFIX=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install opencv in default path";
                        cmake -DCMAKE_BUILD_TYPE=RELEASE;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -255,15 +262,16 @@ function install_protobuf()
                then
                        echo "install protobuf in $1";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install protobuf in default path";
                        ./configure;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -287,15 +295,16 @@ function install_zeromq()
                then
                        echo "install zeromq in $1";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install zeromq in default path";
                        ./configure;
+                       make && sudo make install;
                else
                        echo "wrong commands";
        fi
        
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ..;
@@ -320,15 +329,16 @@ function install_zookeeper()
                then
                        echo "install zookeeper in $1";
                        ./configure --prefix=$1;
+                       make && make install;
                elif [ $# == 0 ]
                then
                        echo "install zookeeper in default path";
                        ./configure;
+                       make && sudo make install;
                else 
                        echo "wrong commands";
        fi
 
-       make && make install;
        if [ $? -ne 0 ]
        then
                cd ../../..;

Reply via email to