# check 'cereal' library, if it doesn't exits, ask user to download it
if not os.path.exists(old) and not os.path.exists(cur):
- print '''
+ cereal_env = Environment(ENV = os.environ)
+ c = cereal_env.Action(['git clone https://github.com/USCiLab/cereal.git cereal',
+ 'cd cereal && git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 && git apply ../../../resource/patches/cereal_gcc46.patch',
+ ])
+
+ print 'Downloading cereal library ...'
+ if cereal_env.Execute(c):
+ print '''
*********************************** Error: ************************************
-* 'Cereal' library doesn't exist. please download cereal to extlibs directory*
-* add apply the patch as following: *
+* Please download cereal and apply the patch as following: *
* $ git clone https://github.com/USCiLab/cereal.git extlibs/cereal/cereal *
* $ cd extlibs/cereal/cereal *
* $ git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 *
* $ git apply ../../../resource/patches/cereal_gcc46.patch *
*******************************************************************************
'''
- Exit(1)
-else:
- env.AppendUnique(CPPPATH = [old, cur])
+ Exit(1)
+ else:
+ print 'Download cereal library complete'
+
+env.AppendUnique(CPPPATH = [old, cur])