-
Notifications
You must be signed in to change notification settings - Fork 96
/
prepare-etherpad.sh
executable file
·84 lines (74 loc) · 2.12 KB
/
prepare-etherpad.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
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/sh
# Include these steps if running locally
# They have been included on CircleCI already
# cp ep-settings.json etherpad/settings.json
# cp ep-package.json etherpad/src/package.json
BASE_DIR="$(pwd)"
ETHERPAD="$(pwd)/etherpad"
ETHERPAD_MODULES="${ETHERPAD}/node_modules"
echo ""
echo "###"
echo "### Step 1: set up vars"
echo "###"
echo "Etherpad path: ${ETHERPAD}"
echo ""
echo ""
echo "###"
echo "### Step 2: Preparing to install dependencies..."
echo "###"
sed -i -e "93 s,grep.*,grep -E -o 'v[0-9]\.[0-9](\.[0-9])?')," ${ETHERPAD}/bin/installDeps.sh
sed -i -e '96 s,if.*,if [ "${VERSION#v}" = "$NEEDED_VERSION" ]; then,' ${ETHERPAD}/bin/installDeps.sh
${ETHERPAD}/bin/installDeps.sh
echo ""
echo ""
echo "###"
echo "### Step 3: Installing ep_headings module..."
echo "###"
cd ${ETHERPAD} && npm install ep_headings
rm package-lock.json
cd ${BASE_DIR}
echo ""
echo ""
echo "###"
echo "### Step 4: Installing ep_page_view module..."
echo "###"
cd ${ETHERPAD} && npm install [email protected]
rm package-lock.json
cd ${BASE_DIR}
echo ""
echo ""
echo "###"
echo "### Step 5: Installing ep_comments module..."
echo "###"
echo "$(pwd)"
git clone https://github.com/oaeproject/ep_comments ${ETHERPAD_MODULES}/ep_comments_page \
&& cd ${ETHERPAD_MODULES}/ep_comments_page \
&& npm install
cd ${BASE_DIR}
echo ""
echo ""
echo "###"
echo "### Step 6: Installing ep_oae module..."
echo "###"
git clone https://github.com/oaeproject/ep_oae ${ETHERPAD_MODULES}/ep_oae \
&& cd ${ETHERPAD_MODULES}/ep_oae \
&& npm install
cd ${BASE_DIR}
echo ""
echo ""
echo "###"
echo "### Step 7: Making CSS adjustments..."
echo "###"
cd ${ETHERPAD} \
&& rm node_modules/ep_headings/templates/editbarButtons.ejs \
&& cp node_modules/ep_oae/static/templates/editbarButtons.ejs node_modules/ep_headings/templates/editbarButtons.ejs
cd ${ETHERPAD} \
&& rm src/static/custom/pad.css \
&& cp node_modules/ep_oae/static/css/pad.css src/static/custom/pad.css
cd ${BASE_DIR}
echo ""
echo ""
echo "#################################"
echo "Creating keys..."
echo "13SirapH8t3kxUh5T5aqWXhXahMzoZRA" > ${ETHERPAD}/APIKEY.txt
echo "cocoxixi" > ${ETHERPAD}/SESSIONKEY.txt