mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qemu-iotests: Ensure GNU sed is used
Various sed regexp from common.filter use sed GNU extensions. Instead of spending time to write these regex to be POSIX compliant, verify the GNU sed is available and use it. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
11a82d1429
commit
bde36af1ab
2 changed files with 31 additions and 18 deletions
|
@ -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" ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue