Jonathan Hart | 59c036f | 2015-04-01 16:33:33 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | export USER=distributed |
| 4 | export USER_HOME=/home/${USER} |
| 5 | |
| 6 | echo "Creating distributed tutorial" |
| 7 | |
| 8 | IDEA_URL=http://download.jetbrains.com/idea/ideaIC-14.0.2.tar.gz |
| 9 | |
| 10 | cd ~ |
| 11 | |
| 12 | git clone https://github.com/bocon13/onos-byon.git |
| 13 | |
| 14 | sed -i -e 's/open/xdg-open/' ~/onos/tools/test/bin/onos-gui |
| 15 | |
| 16 | cat > ~/startmn.sh << EOF |
| 17 | #!/bin/bash |
| 18 | sudo python ~/onos/tools/test/topos/sol.py \$OC1 \$OC2 \$OC3 |
| 19 | EOF |
| 20 | |
| 21 | chmod +x ~/startmn.sh |
| 22 | |
| 23 | DESKTOP=${USER_HOME}/Desktop |
| 24 | |
| 25 | mkdir -p ${DESKTOP} |
| 26 | |
| 27 | cat > ${DESKTOP}/IntelliJ << EOF |
| 28 | [Desktop Entry] |
| 29 | Encoding=UTF-8 |
| 30 | Type=Application |
| 31 | Name=IntelliJ |
| 32 | Name[en_US]=IntelliJ |
| 33 | Icon=/home/distributed/Applications/idea/bin/idea.png |
| 34 | Exec=/home/distributed/Applications/idea/bin/idea.sh |
| 35 | Comment[en_US]= |
| 36 | EOF |
| 37 | |
| 38 | cat > ${DESKTOP}/Tutorial << EOF |
| 39 | [Desktop Entry] |
| 40 | Encoding=UTF-8 |
| 41 | Type=Application |
| 42 | Name=ONOS Tutorial |
| 43 | Name[en_US]=ONOS Tutorial |
| 44 | Icon=internet-web-browser |
| 45 | Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Distributed+ONOS+Tutorial |
| 46 | Comment[en_US]= |
| 47 | EOF |
| 48 | |
| 49 | |
| 50 | cat > ${DESKTOP}/Wireshark << EOF |
| 51 | [Desktop Entry] |
| 52 | Encoding=UTF-8 |
| 53 | Type=Application |
| 54 | Name=Wireshark |
| 55 | Name[en_US]=Wireshark |
| 56 | Icon=wireshark |
| 57 | Exec=/usr/bin/wireshark |
| 58 | Comment[en_US]= |
| 59 | EOF |
| 60 | |
| 61 | cat > ${DESKTOP}/Terminal << EOF |
| 62 | [Desktop Entry] |
| 63 | Encoding=UTF-8 |
| 64 | Name=LXTerminal |
| 65 | TryExec=lxterminal |
| 66 | Exec=lxterminal |
| 67 | Icon=lxterminal |
| 68 | Type=Application |
| 69 | Categories=GTK;Utility;TerminalEmulator; |
| 70 | EOF |
| 71 | |
| 72 | sudo apt-get install -y git-review |
| 73 | |
| 74 | # Install IntelliJ |
| 75 | mkdir ~/Applications |
| 76 | cd ~/Applications |
| 77 | |
| 78 | wget -c -N -O /tmp/idea.tar.gz ${IDEA_URL} |
| 79 | tar xzf /tmp/idea.tar.gz |
| 80 | sudo mv idea-IC-139.659.2 idea |
| 81 | |
| 82 | cd - |