Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@maps.me>2015-09-20 06:58:29 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 03:06:41 +0300
commit5eeeb39bfbd30e81e6df5346dbebdca72ec1f2a1 (patch)
tree0e66ab2c0c8e3a03c6e4378818ad0b918801062d /configure.sh
parente5fe96bfb989b58383bc62ba98d4ec6128253c1d (diff)
Added configure.sh script to init repository.
Diffstat (limited to 'configure.sh')
-rwxr-xr-xconfigure.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/configure.sh b/configure.sh
new file mode 100755
index 0000000000..2c09d0f691
--- /dev/null
+++ b/configure.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+# Please run this script to configure the repository after cloning it.
+
+# Stop on the first error.
+set -e
+
+PRIVATE_HEADER="private.h"
+PRIVATE_PROPERTIES="android/secure.properties"
+SAVED_PRIVATE_REPO_FILE=".private_repository_url"
+TMP_REPO_DIR=".tmp.private.repo"
+
+if [ ! -f "./omim.pro" ]; then
+ echo "Please run this script from the root repository folder."
+ exit -1
+fi
+
+if [ -f "$SAVED_PRIVATE_REPO_FILE" ]; then
+ PRIVATE_REPO=`cat "$SAVED_PRIVATE_REPO_FILE"`
+ echo "Using stored private repository URL: $PRIVATE_REPO"
+else
+ echo "If you are developer from MAPS.ME team, please specify a private repository url here."
+ echo "If not [yet :)], then just press Enter."
+ echo -n "> "
+ read PRIVATE_REPO
+ if [ -z "$PRIVATE_REPO" ]; then
+ echo "Initializing repository with default values in Open-Source mode."
+ echo '
+#pragma once
+
+#define ALOHALYTICS_URL ""
+#define FLURRY_KEY ""
+#define MY_TRACKER_KEY ""
+#define PARSE_APPLICATION_ID ""
+#define PARSE_CLIENT_KEY ""
+#define MWM_GEOLOCATION_SERVER ""
+#define OSRM_ONLINE_SERVER_URL ""
+#define RESOURCES_METASERVER_URL ""
+#define METASERVER_URL ""
+#define DEFAULT_URLS_JSON ""
+' > "$PRIVATE_HEADER"
+ echo '
+ext {
+ spropStoreFile = "../tools/android/debug.keystore"
+ spropStorePassword = "12345678"
+ spropKeyAlias = "debug"
+ spropKeyPassword = "12345678"
+ spropYotaStoreFile = "../tools/android/debug.keystore"
+ spropYotaStorePassword = "12345678"
+ spropYotaKeyAlias = "debug"
+ spropYotaKeyPassword = "12345678"
+}
+' > "$PRIVATE_PROPERTIES"
+ exit
+ fi
+fi
+
+git clone --depth 1 "$PRIVATE_REPO" "$TMP_REPO_DIR"
+if [ $? == 0 ]; then
+ echo "Saved private repository url to $SAVED_PRIVATE_REPO_FILE"
+ echo "$PRIVATE_REPO" > "$SAVED_PRIVATE_REPO_FILE"
+ rm -rf "$TMP_REPO_DIR/.git" "$TMP_REPO_DIR/README.md"
+ cp -Rv "$TMP_REPO_DIR/" .
+ rm -rf "$TMP_REPO_DIR"
+ echo "Private files have been updated."
+fi