diff options
Diffstat (limited to 'tests/qemu-iotests/common.rc')
-rw-r--r-- | tests/qemu-iotests/common.rc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 09a27f02d0..a543e546c2 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2009 Red Hat, Inc. # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. @@ -17,6 +17,19 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # +SED= +for sed in sed gsed; do + ($sed --version | grep 'GNU sed') > /dev/null 2>&1 + if [ "$?" -eq 0 ]; then + SED=$sed + break + fi +done +if [ -z "$SED" ]; then + echo "$0: GNU sed not found" + exit 1 +fi + dd() { if [ "$HOSTOS" == "Linux" ] |