-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
executable file
·31 lines (24 loc) · 1017 Bytes
/
init.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
#!/bin/sh
AOZORA_REL=v1.1.1b13Q
AOZORA_ZIP=AozoraEpub3-1.1.1b13Q.zip
AOZORA_DIR=/opt/narou/AozoraEpub3-1.1.1b13Q
# Extract the latest AozoraEpub3 to /opt/narou (host's $HOME/.narou).
if [ ! -d ${AOZORA_DIR} ]; then
curl -L https://github.com/kyukyunyorituryo/AozoraEpub3/releases/download/${AOZORA_REL}/${AOZORA_ZIP} -o /tmp/${AOZORA_ZIP}
unzip -q /tmp/${AOZORA_ZIP} -d /opt/narou
ln -s /narou/kindlegen.sh ${AOZORA_DIR}/kindlegen
# Create dummy directories
mkdir -p ${AOZORA_DIR}/template/OPS/css_custom/
# Initialize by narou
narou init -p ${AOZORA_DIR} -l 1.6
fi
if [ ! -d "/opt/narou/.narousetting" ]; then
narou setting device=kindle
# Do not make .narousetting nor .narou directory at the beginning
# since narou changes it's behavior of existance of them.
# However, we need global setting directory under /opt/narou,
# so moving it here.
mv $HOME/.narousetting /opt/narou/
echo -e "---\nalready-server-boot: true" > /opt/narou/.narousetting/server_setting.yaml
fi
exec "$@"