-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathinstall_mkdocs.sh
executable file
·47 lines (37 loc) · 1.05 KB
/
install_mkdocs.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
#!/bin/bash
SCRIPT_NAME=$(basename $BASH_SOURCE)
SCRIPT_LOGFILE="./logs/"$(basename -s .sh $BASH_SOURCE)".log"
SCRIPT_ENVFILE="./logs/"$(basename -s .sh $BASH_SOURCE)".env"
mkdir -p ./logs && chmod 755 ./logs
echo "running "$SCRIPT_NAME
# tested: works on ubuntu 14.04.3 gnome
# checking python
if hash python 2>/dev/null; then
echo " checking python => ok"
else
echo " checking python => python not installed, please install it and retry"
exit;
fi
# checking pip
if hash pip 2>/dev/null; then
echo " checking pip => ok"
else
echo " checking pip => pip not installed, please install it and retry"
exit;
fi
# check python-dev
dpkg -s python-dev &>> /dev/null
if [ $? -eq 0 ] ; then
echo " checking python-dev package => ok"
else
echo " checking python-dev => python-dev not installed, installing it now"
sudo apt-get -y install python-dev
fi
# checking mkdocs
if hash mkdocs 2>/dev/null; then
echo " checking mkdocs => ok"
else
echo " checking mkdocs => mkdocs not installed, installing it now"
sudo pip install markupsafe
sudo pip install mkdocs
fi