#!/bin/bash # # Copyright (C) 2015 GNS3 Technologies Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # # Update script called from the GNS 3 VM in stable mode # set -e export BRANCH="master" export UNSTABLE_APT="0" curl -Lk "https://raw.githubusercontent.com/GNS3/gns3-vm/$BRANCH/scripts/upgrade.sh" > /tmp/upgrade.sh && bash -x /tmp/upgrade.sh if [[ ! -d "gns3-server" ]] then sudo apt-get update sudo apt-get install -y git git clone https://github.com/GNS3/gns3-server.git gns3-server fi cd gns3-server git reset --hard HEAD git fetch origin --tags TAG=`git tag -l 'v2.1*' | grep -v '[abr]' | sort -V | tail -n 1` git checkout $TAG if [[ -z "$HTTP_PROXY" ]] then sudo python3 -m pip install -r requirements.txt else sudo python3 -m pip --proxy $HTTP_PROXY install -r requirements.txt fi # setuptools 43.0.0 is the last version to support Python 3.4 sudo python3 -m pip install setuptools==43.0.0 sudo python3 setup.py install echo "Reboot in 5s" sleep 5 sudo reboot