blob: 5f4f0a8065230d41e9b3a748afb0e2c0b66586bd (
plain)
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
|
#!/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
|