1.1 --- a/uml-linux-build Thu Jan 15 21:24:42 2015 +0100
1.2 +++ b/uml-linux-build Thu Jan 15 21:25:08 2015 +0100
1.3 @@ -1,6 +1,6 @@
1.4 #!/bin/sh
1.5
1.6 -# Copyright (C) 2011, 2012, 2013 Paul Boddie <paul@boddie.org.uk>
1.7 +# Copyright (C) 2011, 2012, 2013, 2014 Paul Boddie <paul@boddie.org.uk>
1.8 #
1.9 # This program is free software; you can redistribute it and/or modify it under
1.10 # the terms of the GNU General Public License as published by the Free Software
1.11 @@ -40,11 +40,20 @@
1.12 if [ ! -e "$LINUXDIRNAME" ]; then
1.13 if [ ! -e "$LINUXARCHIVE" ]; then
1.14 echo "Getting the Linux kernel archive..." 1>&2
1.15 - wget -O "$LINUXARCHIVE" "$LINUXADDRESS"
1.16 + if ! wget -O "$LINUXARCHIVE" "$LINUXADDRESS" ; then
1.17 + echo "Unable to download from URL: $LINUXADDRESS" 1>&2
1.18 + exit 1
1.19 + fi
1.20 fi
1.21
1.22 echo "Unpacking the archive..." 1>&2
1.23 - tar jxf "$LINUXARCHIVE"
1.24 + if [ `basename "$LINUXARCHIVE" .bz2` != "$LINUXARCHIVE" ]; then
1.25 + tar jxf "$LINUXARCHIVE"
1.26 + elif [ `basename "$LINUXARCHIVE" .gz` != "$LINUXARCHIVE" ]; then
1.27 + tar zxf "$LINUXARCHIVE"
1.28 + else
1.29 + echo "Don't know how to unpack the downloaded file: $LINUXARCHIVE" 1>&2
1.30 + fi
1.31 fi
1.32 if [ ! -e "$LINUXDIRNAME/linux" ]; then
1.33