Browse Source

Update autogen.sh

Fix the bug in following scenario:  

gmock is downloaded successfully while gtest not. Resuming "autogen.sh",
the gtest won't be downloaded. And following error will occur:  

$ ./autogen.sh
+ autoreconf -f -i -Wall,no-obsolete
aclocal: error: configure.ac:1: file 'gtest/m4/acx_pthread.m4' does not exist
autoreconf: aclocal failed with exit status: 1
Nan Xiao 8 years ago
parent
commit
f4ff17bb16
1 changed files with 2 additions and 0 deletions
  1. 2 0
      autogen.sh

+ 2 - 0
autogen.sh

@@ -35,7 +35,9 @@ if test ! -e gmock; then
   unzip -q release-1.7.0.zip
   unzip -q release-1.7.0.zip
   rm release-1.7.0.zip
   rm release-1.7.0.zip
   mv googlemock-release-1.7.0 gmock
   mv googlemock-release-1.7.0 gmock
+fi
 
 
+if test ! -e gmock/gtest; then
   curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip
   curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip
   unzip -q release-1.7.0.zip
   unzip -q release-1.7.0.zip
   rm release-1.7.0.zip
   rm release-1.7.0.zip