forked from pplante/droidtowers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pull-libgdx-nightly.sh
executable file
·67 lines (52 loc) · 1.74 KB
/
pull-libgdx-nightly.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
TODAYS_DATE=`date -u +%C%y%m%d`
NIGHTLY_NAME="libgdx-nightly-latest"
NIGHTLY_URL="http://libgdx.badlogicgames.com/nightlies/${NIGHTLY_NAME}.zip"
DOWNLOAD_PATH="/tmp/${NIGHTLY_NAME}.zip"
EXTRACT_PATH="/tmp/${NIGHTLY_NAME}"
PROJECT_DIR=`pwd`
echo "* Downloading latest nightly from:"
echo $NIGHTLY_URL
echo
curl -# -o $DOWNLOAD_PATH $NIGHTLY_URL
DOWNLOAD_SUCCESS=$?
if [[ $DOWNLOAD_SUCCESS != 0 ]]; then
echo
echo "Download failed, aborting."
exit $DOWNLOAD_SUCCESS
fi;
echo
echo "* Unziping nightly zip: ${DOWNLOAD_PATH}"
echo
unzip -qqo $DOWNLOAD_PATH -d $EXTRACT_PATH
UNZIP_SUCCESS=$?
if [[ $UNZIP_SUCCESS != 0 ]]; then
echo
echo "Unzip failed, aborting."
exit $UNZIP_SUCCESS
fi;
echo
echo "* Copying android libs..."
echo
ANDROID_LIBS_PATH="${PROJECT_DIR}/android-shared/libs/."
cp -R "${EXTRACT_PATH}/armeabi" $ANDROID_LIBS_PATH
cp -R "${EXTRACT_PATH}/armeabi-v7a" $ANDROID_LIBS_PATH
cp "${EXTRACT_PATH}/gdx-backend-android.jar" $ANDROID_LIBS_PATH
cp "${EXTRACT_PATH}/sources/gdx-backend-android-sources.jar" $ANDROID_LIBS_PATH
echo
echo "* Copying desktop libs..."
echo
DESKTOP_LIBS_PATH="${PROJECT_DIR}/desktop/libs"
cp "${EXTRACT_PATH}/sources/gdx-openal-sources.jar" "${DESKTOP_LIBS_PATH}/sources"
cp "${EXTRACT_PATH}/gdx-backend-lwjgl-natives.jar" "${DESKTOP_LIBS_PATH}/main"
cp "${EXTRACT_PATH}/sources/gdx-backend-lwjgl-sources.jar" "${DESKTOP_LIBS_PATH}/sources"
cp "${EXTRACT_PATH}/gdx-backend-lwjgl.jar" "${DESKTOP_LIBS_PATH}/main"
cp "${EXTRACT_PATH}/gdx-natives.jar" "${DESKTOP_LIBS_PATH}/main"
echo
echo "* Copying shared libs..."
echo
SHARED_LIBS_PATH="${PROJECT_DIR}/main/libs/"
cp "${EXTRACT_PATH}/sources/gdx-sources.jar" "${SHARED_LIBS_PATH}/sources"
cp "${EXTRACT_PATH}/gdx.jar" "${SHARED_LIBS_PATH}/main"
echo
echo "Complete!"