-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
34 lines (26 loc) · 961 Bytes
/
install.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
#!/bin/bash
MOBYLETTE_HOME=`pwd`
export PATH=$MOBYLETTE_HOME/bin:$PATH
export PYTHONPATH=$MOBYLETTE_HOME:$PYTHONPATH
# Creates mobylette.conf
CONF_FILE=mobylette.conf
CONF_PATH=`eval echo ~$USER`/.mobylette
if [ -d "$CONF_PATH" ]; then
read -p "$CONF_PATH already exists. Overwrite (y/n)? " ANSWER
if [ "$ANSWER" = "n" ]; then
echo "mobylette ready"
return
fi
if [ "$ANSWER" = "y" ]; then
rm -r $CONF_PATH
mkdir $CONF_PATH
echo "[CLUSTER]" > $CONF_PATH/$CONF_FILE
echo "log_path=$MOBYLETTE_HOME/" >> $CONF_PATH/$CONF_FILE
echo "name=phoenix" >> $CONF_PATH/$CONF_FILE
echo "nodes=" >> $CONF_PATH/$CONF_FILE
echo "patterns=dataset" >> $CONF_PATH/$CONF_FILE
echo "prefix=sample" >> $CONF_PATH/$CONF_FILE
echo "mobylette ready"
return
fi
fi