-
Notifications
You must be signed in to change notification settings - Fork 5
/
install_robomongo.sh
executable file
·58 lines (40 loc) · 1.46 KB
/
install_robomongo.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
52
53
54
55
#!/bin/bash
SCRIPT_NAME=$(basename $BASH_SOURCE)
SCRIPT_LOGFILE="./logs/"$(basename -s .sh $BASH_SOURCE)".log"
mkdir -p ./logs && chmod 755 ./logs
echo "running "$SCRIPT_NAME
# tested: works on ubuntu 14.04.3 gnome
#https://download.robomongo.org/1.0.0-rc1/linux/robomongo-1.0.0-rc1-linux-x86_64-496f5c2.tar.gz
#https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
URL='https://download.robomongo.org/1.0.0-rc1/linux/robomongo-1.0.0-rc1-linux-x86_64-496f5c2.tar.gz'
rm -rf ~/.robomongo_latest
mkdir -p ~/.robomongo_latest
cd ~/.robomongo_latest
wget $URL
tar xfz robomongo-1.0.0-rc1-linux-x86_64-496f5c2.tar.gz
mv ./robomongo-1.0.0-rc1-linux-x86_64-496f5c2/* .
rm -rf ./robomongo-1.0.0-rc1-linux-x86_64-496f5c2*
cd -
#
# add path
#
if grep -Fxq '# installed by ubuntu-desktop-post-install/install_robomongo.sh #' ~/.bashrc
then
echo " path already added"
else
echo '' >> ~/.bashrc
echo '#' >> ~/.bashrc
echo '# robomongo' >> ~/.bashrc
echo '#' >> ~/.bashrc
echo '# installed by ubuntu-desktop-post-install/install_robomongo.sh #' >> ~/.bashrc
echo '#' >> ~/.bashrc
echo 'export PATH="$HOME/.robomongo_latest/bin:$PATH"' >> ~/.bashrc
echo '' >> ~/.bashrc
fi
# old install doesnt work any more
#sudo apt-get install -y libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0
#URL='http://robomongo.org/files/linux/robomongo-0.8.5-x86_64.deb'
#FILE=`mktemp`
#wget "$URL" -qO $FILE
#sudo dpkg -i $FILE
#rm $FILE