fetchUpstream.sh 676 Bytes
Newer Older
James Goppert's avatar
James Goppert committed
1 2 3 4 5 6
#!/bin/bash

PS3='Please enter your choice: '
LIST="all mavlink qserialport end"
echo 
echo this script grabs upstream releases
James Goppert's avatar
James Goppert committed
7
echo
James Goppert's avatar
James Goppert committed
8 9 10

function fetch_qserialport
{
James Goppert's avatar
James Goppert committed
11
	echo
James Goppert's avatar
James Goppert committed
12 13 14 15 16 17 18
	rm -rf qserialport
	git clone git://gitorious.org/inbiza-labs/qserialport.git
	rm -rf qserialport/.git
}

function fetch_mavlink
{
James Goppert's avatar
James Goppert committed
19
	echo
James Goppert's avatar
James Goppert committed
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
	rm -rf mavlink
	git clone git@github.com:openmav/mavlink.git
	rm -rf mavlink/.git
}

echo
select OPT in $LIST
do
	case $OPT in
		"qserialport")
			fetch_qserialport
			exit 0
			;;
		"mavlink") 
			fetch_mavlink
			exit 0
			;;
		"all")
			fetch_mavlink
			fetch_qserialport
			exit 0
			;;
		"exit")
			exit 0
			;;
		*)
			echo unknown option
			exit 1
	esac
done