issue #4674: Added download-deps.sh

This commit is contained in:
James Chen 2014-05-04 14:38:15 +08:00
parent 8cbcf17163
commit 2732d294e2
1 changed files with 27 additions and 0 deletions

27
download-deps.sh Executable file
View File

@ -0,0 +1,27 @@
#!/bin/bash
#
# ./download-deps.sh
#
# Download Cocos2D-X resources from github (https://github.com/minggo/cocos2d-x-resources) and extract from ZIP
#
# Helps prevent repo bloat due to large binary files since they can
# be hosted separately.
#
# exit this script if any commmand fails
set -e
prefix=https://codeload.github.com/minggo/cocos2d-x-resources/zip
filename=cocos2d-x-deps-v3-1
extracted_folder_name=cocos2d-x-resources-$filename
echo Downloading $filename.zip from $prefix...
curl -# $prefix/$filename -o $filename.zip
echo Extracting $filename.zip... please standby...
unzip -q $filename.zip
cp -R $extracted_folder_name/* .
echo Cleaning up...
rm $filename.zip
rm -rf $extracted_folder_name
echo Done.