forked from eScholarship/jschol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·30 lines (22 loc) · 971 Bytes
/
setup.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
#!/usr/bin/env bash
# If an error occurs, stop this script
set -e
printf "== Installing local Ruby gems ==\n"
bundle install --quiet --path=gems --binstubs
#printf "\n== Uninstalling Ruby gems no longer used ==\n"
bundle clean
printf "\n== Installing node packages (used by gulp and iso via Node) ==\n"
yarn install --silent
printf "\n== Patching React to suppress unavoidable warnings from sub-modules ==\n"
perl -pi -e 's/warnedForCreateClass = false/warnedForCreateClass = true/' node_modules/react/lib/React.js
perl -pi -e 's/didWarnPropTypesDeprecated = false/didWarnPropTypesDeprecated = true/' node_modules/react/lib/React.js
printf "\n== Installing bower packages (used in browser) ==\n"
node_modules/.bin/bower install
printf "\n== Uninstalling bower packages no longer used ==\n"
node_modules/.bin/bower prune
if [[ `/bin/hostname` == "*pub-submit*" ]]; then
printf "\n== Building splash page generator ==\n"
cd splash
./setupSplash.sh
cd ..
fi