-
Notifications
You must be signed in to change notification settings - Fork 19
/
build_from_source.sh
executable file
·31 lines (26 loc) · 1.16 KB
/
build_from_source.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/bash
CONF_FILE_DIR=${HOME}/.swan/client
mkdir -p ${CONF_FILE_DIR}
current_create_time=`date +"%Y%m%d%H%M%S"`
if [ -f "${CONF_FILE_DIR}/config.toml" ]; then
mv ${CONF_FILE_DIR}/config.toml ${CONF_FILE_DIR}/config.toml.${current_create_time}
echo "The previous configuration files have been backed up: ${CONF_FILE_DIR}/config.toml.${current_create_time}"
cp ./config/config.toml.example ${CONF_FILE_DIR}/config.toml
echo "${CONF_FILE_DIR}/config.toml created"
else
cp ./config/config.toml.example ${CONF_FILE_DIR}/config.toml
echo "${CONF_FILE_DIR}/config.toml created"
fi
if [ -f "${CONF_FILE_DIR}/chain-rpc.json" ]; then
mv ${CONF_FILE_DIR}/chain-rpc.json ${CONF_FILE_DIR}/chain-rpc.json.${current_create_time}
echo "The previous configuration files have been backed up: ${CONF_FILE_DIR}/chain-rpc.json.${current_create_time}"
cp ./config/chain-rpc.json ${CONF_FILE_DIR}/chain-rpc.json
echo "${CONF_FILE_DIR}/chain-rpc.json created"
else
cp ./config/chain-rpc.json ${CONF_FILE_DIR}/chain-rpc.json
echo "${CONF_FILE_DIR}/chain-rpc.json created"
fi
git submodule update --init --recursive
make ffi
make
make install-client