[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v3 01/22] mg-*: Add mgi-common with fetch and fail helpers
Taken from both mg-cpu-microcode-update and mg-debian-installer-update Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- v3: New patch --- mg-cpu-microcode-update | 3 ++- mg-debian-installer-update | 8 +------- mgi-common | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 mgi-common diff --git a/mg-cpu-microcode-update b/mg-cpu-microcode-update index 759f676..c375a43 100755 --- a/mg-cpu-microcode-update +++ b/mg-cpu-microcode-update @@ -3,6 +3,7 @@ set -e . cri-getconfig +. mgi-common # iucode_tool is in /usr/sbin, see #788459. export PATH="/usr/local/sbin:$PATH:/sbin:/usr/sbin" @@ -41,7 +42,7 @@ INTEL_TGZ='http://downloadmirror.intel.com/24661/eng/microcode-20150121.tgz' mkdir intel-ucode echo >&2 "Fetching Intel ucode" -curl -s $INTEL_TGZ > intel-ucode/microcode.tgz +fetch $INTEL_TGZ > intel-ucode/microcode.tgz tar -C intel-ucode -xaf intel-ucode/microcode.tgz microcode.dat diff --git a/mg-debian-installer-update b/mg-debian-installer-update index ba2fdc4..770022c 100755 --- a/mg-debian-installer-update +++ b/mg-debian-installer-update @@ -22,21 +22,15 @@ set -e . cri-getconfig +. mgi-common suite=$1 arch=$2 packages="$3" -fail () { echo >&2 "$0: $1"; exit 1; } - site=http://ftp.debian.org/debian/ sbase=$site/dists/$suite -fetch () { - # no-cache due to intercepting proxies messing things up. - curl -s -H 'Pragma: no-cache' $1 -} - case ${suite}_${arch} in lenny_armhf|squeeze_armhf|lenny_arm64|squeeze_arm64|wheezy_arm64) # No such thing. diff --git a/mgi-common b/mgi-common new file mode 100644 index 0000000..de86e8d --- /dev/null +++ b/mgi-common @@ -0,0 +1,26 @@ +# -*- bash -*- + +# Helpers for mg-* +# +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2015 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +fail () { echo >&2 "$0: $1"; exit 1; } + +fetch () { + # no-cache due to intercepting proxies messing things up. + curl -s -H 'Pragma: no-cache' $1 +} -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |