modify post.sh for creating lib folder

add build-linux.sh file
This commit is contained in:
dumganhar 2011-09-20 15:41:25 +08:00
parent eeb0956fb8
commit faed6b5770
2 changed files with 102 additions and 0 deletions

74
build-linux.sh Normal file
View File

@ -0,0 +1,74 @@
#!/bin/sh
if [ ! -d "lib" ]; then
mkdir "lib"
fi
if [ ! -d "lib/linux" ]; then
mkdir "lib/linux"
fi
if [ ! -d "lib/android" ]; then
mkdir "lib/android"
fi
if [ ! -d "lib/linux/Debug" ]; then
mkdir "lib/linux/Debug"
fi
if [ ! -d "lib/linux/Release" ]; then
mkdir "lib/linux/Release"
fi
if [ ! -d "lib/android/Debug" ]; then
mkdir "lib/android/Debug"
fi
if [ ! -d "lib/android/Release" ]; then
mkdir "lib/android/Release"
fi
if [ $# -ne 0 ]; then
if [ $1 = "clean" ]; then
cd ./cocos2dx/proj.linux
make clean
cd ../../
cd ./CocosDenshion/proj.linux
make clean
cd ../../
cd ./HelloWorld/Linux
make clean
cd ../../
cd ./tests/test.linux
make clean
cd ../../
rm -r lib
fi
else
cd ./cocos2dx/proj.linux
make
cp -f libcocos2d.so ../../lib/linux/Debug
cd ../../
cd ./CocosDenshion/proj.linux
make
cp -f libCocosDenshion.so ../../lib/linux/Debug
cd ../../
cd ./HelloWorld/Linux
make
cd ../../
cd ./tests/test.linux
make
cd ../../
fi

28
post.sh
View File

@ -12,4 +12,32 @@ fi
echo "mode: $modeDir"
echo "mode: $libDir"
if [ ! -d "lib" ]; then
mkdir "lib"
fi
if [ ! -d "lib/linux" ]; then
mkdir "lib/linux"
fi
if [ ! -d "lib/android" ]; then
mkdir "lib/android"
fi
if [ ! -d "lib/linux/Debug" ]; then
mkdir "lib/linux/Debug"
fi
if [ ! -d "lib/linux/Release" ]; then
mkdir "lib/linux/Release"
fi
if [ ! -d "lib/android/Debug" ]; then
mkdir "lib/android/Debug"
fi
if [ ! -d "lib/android/Release" ]; then
mkdir "lib/android/Release"
fi
test -e ../$3/lib$1.so&& cp ../$3/lib$1.so ../../../lib/$libDir/$modeDir/lib$2.so