make script more strongable

This commit is contained in:
minggo 2011-10-18 23:21:39 -07:00
parent 9a834585bb
commit 3a17163897
2 changed files with 11 additions and 30 deletions

View File

@ -2,28 +2,21 @@
#arguments
#1 is the config name
#2 is the project name
#3 is the cocos2d sdk base folder
#4 is the resource folder name if it has
#3 is the cocos2dx sdk base folder
originRes="Resource"
echo $#
if [ $# > 2 ]; then
echo "ok"
else
echo "configname or proj name do not assign"
if [ $# -lt 3 ]; then
echo "usage sh postCompiled.sh confi-gname project-name cocos2dx-root"
exit
fi
if [ -d "../../android/libs" ];then
echo "create libs"
else
if [ ! -d "../../android/libs" ];then
mkdir ../../android/libs
fi
if [ -d "../../android/libs/armeabi" ];then
echo "create libs"
else
if [ ! -d "../../android/libs/armeabi" ];then
mkdir ../../android/libs/armeabi
fi
#move game lib into android/libs/armeabi
@ -34,14 +27,10 @@ cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../android/libs/armeabi/
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../android/libs/armeabi/
#link the resource folder
if [ -L ../../android/assets ];then
if [ -d ../../android/assets ];then
exit
fi
if [ $# == '4' ];then
originRes=$4
fi
echo `pwd`/../../$originRes
ln -s `pwd`/../../$originRes ../../android/assets

View File

@ -3,26 +3,18 @@
#1 is the config name
#2 is the project name
#3 is the cocos2d sdk base folder
#4 is the resource folder name if it has
echo $#
if [ $# > 2 ]; then
echo "ok"
else
echo "configname or proj name do not assign"
if [ $# -lt 3 ];then
echo "usage sh postCompiled.sh confi-gname project-name cocos2dx-root"
exit
fi
if [ -d "../../test.android/libs" ];then
echo "create libs"
else
if [ ! -d "../../test.android/libs" ];then
mkdir ../../test.android/libs
fi
if [ -d "../../test.android/libs/armeabi" ];then
echo "create libs"
else
if [ ! -d "../../test.android/libs/armeabi" ];then
mkdir ../../test.android/libs/armeabi
fi