2011-03-23 09:42:23 +08:00
|
|
|
#!/bin/sh
|
2011-03-23 15:01:00 +08:00
|
|
|
# This script should be called by create-android-project.bat
|
|
|
|
# or should be runned in linux shell. It can not be runned under
|
|
|
|
# cygwin.
|
|
|
|
# Don't modify the script until you know what you do.
|
2011-03-23 09:42:23 +08:00
|
|
|
|
2011-03-23 15:01:00 +08:00
|
|
|
# check it was runned in cocos2d-x root
|
|
|
|
check_path(){
|
2011-03-23 09:42:23 +08:00
|
|
|
if [ ! -f create-android-project.sh ];then
|
|
|
|
echo Error!!!
|
|
|
|
echo Please run in cocos2dx root
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-03-23 15:01:00 +08:00
|
|
|
check_path
|
|
|
|
|
2011-03-23 14:30:14 +08:00
|
|
|
if [ $4 == "windows" ];then
|
2011-03-23 09:42:23 +08:00
|
|
|
# called by .bat file
|
2011-03-23 14:30:14 +08:00
|
|
|
sh $1/template/android/copy_files.sh $1 $2 $3
|
2011-03-23 09:42:23 +08:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2011-03-23 15:01:00 +08:00
|
|
|
|
2011-03-23 09:42:23 +08:00
|
|
|
# the bash file should not be called by cygwin
|
|
|
|
UNIX_NAME=`uname -o`
|
|
|
|
if [ $UNIX_NAME == "Cygwin" ];then
|
|
|
|
echo "Error!!!"
|
2011-03-23 15:01:00 +08:00
|
|
|
echo "Don't run in cygwin. You should run corresponding bat."
|
2011-03-23 09:42:23 +08:00
|
|
|
exit -1
|
|
|
|
fi
|
2011-03-23 15:01:00 +08:00
|
|
|
|
|
|
|
# ok, it was run under linux
|