-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall.sh
executable file
·51 lines (43 loc) · 1.75 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
##############################################################
# installation script for runlog #
# runners workout log management in bash by tony baldwin #
# http://tonyb.us/runlog #
# released according to the terms of the GNU GPL v.3 or later#
##############################################################
if [ ! -d "$HOME/bin/" ]; then
mkdir $HOME/bin/
PATH=$PATH:/$HOME/bin/
export PATH
fi
rlpath="$HOME/.runlog/"
editor="/usr/bin/vim"
echo "installing runlog ... "
cp runlog.sh $HOME/bin/runlog
chmod +x $HOME/bin/runlog
echo "Creating config files ... "
echo "# runlog config " > $HOME/.runlog.conf
read -p "Enter your name: " uname
read -p "Preferred distance unit (miles, km): " dunit
read -p "Where do you wish to keep your runlog files? (default ~/.runlog/ If you choose another directory, do not forget trailing slash.): " rlpath
read -p "What is your prefered editor? (default /usr/bin/vim): " editor
read -p "What is your prefered web browser? (i.e. /usr/bin/iceweasel) " browser
echo "uname=$uname" >> $HOME/.runlog.conf
echo "rlpath=$rlpath" >> $HOME/.runlog.conf
echo "editor=$editor" >> $HOME/.runlog.conf
echo "browser=$browser" >> $HOME/.runlog.conf
read -p "Will you use the friendica plugin? (y/n)" fplug
if [[ $fplug = y ]]; then
read -p "Enter your friendica username (optional): " fuser
read -p "Enter your friendica password (optional): " fpass
read -p "Enter the url to your friendica site (optional): " $fsite
echo "fplug=y" >> $HOME/.runlog.conf
echo "fuser=$fuser" >> $HOME/.runlog.conf
echo "fpass=$fpass" >> $HOME/.runlog.conf
echo "fsite=$fsite" >> $HOME/.runlog.conf
else
echo "fplug=n0pe" >> $HOME/.runlog.conf
fi
echo "Installation complete."
runlog h
exit