-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
executable file
·72 lines (54 loc) · 2.37 KB
/
bootstrap.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
68
69
70
71
72
#!/bin/bash
# -- install software and dependencies -- #
# install xcode (development suite for Mac OSX)
echo "installing xcode..."
xcode -select -- install
# install homebrew (package manager) from github
echo "installing homebrew (and coreutils)..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install coreutils # helpful UNIX commands
# python
echo "installing python (and pip)..."
brew install python
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py
echo "installing pip packages..."
pip install jupyter # enable jupyter notebooks development (e.g. 'bulib/playground')
pip install requests # handy library for calling APIs from python scripts (e.g. 'bulib/metadata-workbench')
# install node/npm
echo "installing node (and npm)..."
brew install node
echo "installing global npm packages..."
npm install -g es-dev-server # static site development/running locally (e.g. 'bulib/firstyear')
npm install -g cypress # running tests across repositories (e.g. 'bulib/bulib-wc', 'bulib/primo-explore-devenv-bu')
# -- configure accounts -- #
# git config credentials
echo -n "enter your github username: "
read github_username
git config --global user.name "$github_username"
echo -n "enter your github email: "
read github_email
git config --global user.name "$github_email"
# npm login credentials
echo -n "enter 'npm' credentials for the following prompts: "
npm login
# -- setup the repositories -- #
# initialize projects directory
mkdir ~/projects || true
cd ~/projects
# clone the web components directory and firstyear site
git clone https://github.com/bulib/bulib.github.io.git
git clone https://github.com/bulib/bulib-wc.git
git clone https://github.com/bulib/firstyear.git
# set up the BU Libraries Search (primo) development environment
git clone https://github.com/bulib/primo-explore-bu.git
wget https://github.com/ExLibrisGroup/primo-explore-devenv/archive/master.zip
unzip master.zip
rm master.zip
mv primo-explore-devenv-master primo-explore-devenv # rename the directory to match the repository name
cd primo-explore-devenv/primo-explore
rm -rf custom/ tmp/
git clone https://github.com/bulib/primo-explore-devenv-bu.git ./
# backend stuff, scripts, and asserted one-offs
cd ~/projects
git clone https://github.com/bulib/playhouse.git
git clone https://github.com/bulib/metadata-workbench.git