-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·62 lines (45 loc) · 1.33 KB
/
setup.sh
File metadata and controls
executable file
·62 lines (45 loc) · 1.33 KB
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
#!/usr/bin/env bash
cat <<EOT
Checking out into $PWD
What should the git URL be?
[1] HTTPS: https://github.com/hathitrust (default)
[2] SSH: git@github.com:hathitrust
EOT
echo -n "Your choice? [1]: "
read -n 1 proto
GIT_BASE="https://github.com/hathitrust"
if [[ "$proto" == "2" ]]; then
GIT_BASE="git@github.com:hathitrust"
fi
echo
echo
echo 📥 Cloning repositories via $GIT_BASE...
echo
git clone --recurse-submodules $GIT_BASE/catalog
git clone --recurse-submodules $GIT_BASE/imgsrv-sample-data ./sample-data
git clone --recurse-submodules $GIT_BASE/hathitrust_catalog_indexer
git clone --recurse-submodules $GIT_BASE/lss_solr_configs
git clone --recurse-submodules $GIT_BASE/ptsearch-solr
git clone --recurse-submodules $GIT_BASE/firebird-common
echo
echo 🍃 Setting up the environment...
echo
cat <<EOT | tee .env
CURRENT_USER="$(id -u):$(id -g)"
APACHE_RUN_USER="$(id -u)"
APACHE_RUN_GROUP="$(id -g)"
BABEL_HOME="$(dirname $(realpath $0))"
EOT
ln -sfv always_us.mmdb geoip/GeoIP2-Country.mmdb
echo
echo 💎 Setting up stage_item...
echo
docker compose run traject bundle install
docker compose run stage-item bundle install
echo
echo 🐦🔥 Building firebird...
echo
docker compose run firebird /htapps/babel/firebird-common/bin/build.sh
docker compose run page-turner /htapps/babel/pt/bin/build.sh
echo
echo 🎉 Done!