changed build system for Android from Ant to Gradle
[rocksndiamonds.git] / build-projects / android / build-scripts / create_assets.sh
1 #!/bin/bash
2
3 ASSETS_SRC_PATH="../.."
4 ASSETS_SRC_SUBDIRS="conf docs graphics levels music sounds"
5
6 ASSETS_DST_PATH="app/src/main/assets"
7
8 if [ -d "$ASSETS_DST_PATH" ]; then
9     exit 0
10 fi
11
12 mkdir -p "$ASSETS_DST_PATH"
13
14 for i in $ASSETS_SRC_SUBDIRS; do
15     ASSETS_SRC_DIR="$ASSETS_SRC_PATH/$i"
16     ASSETS_DST_DIR="$ASSETS_DST_PATH/$i"
17
18     if [ -d "$ASSETS_DST_DIR" ]; then
19         echo "ERROR: Directory '$ASSETS_DST_DIR' already exists!"
20         exit 10
21     fi
22
23     cp -a "$ASSETS_SRC_DIR" "$ASSETS_DST_DIR"
24 done
25
26 exit 0