[packages/virt-what] fix few bashisms
glen
glen at pld-linux.org
Sat Aug 31 23:36:14 CEST 2013
commit a642c6190279c5472131d92392fa746a5bdd9736
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Sep 1 00:35:57 2013 +0300
fix few bashisms
bashisms.patch | 32 ++++++++++++++++++++++++++++++++
virt-what.spec | 2 ++
2 files changed, 34 insertions(+)
---
diff --git a/virt-what.spec b/virt-what.spec
index acc496b..17d2a7a 100644
--- a/virt-what.spec
+++ b/virt-what.spec
@@ -10,6 +10,7 @@ License: GPL v2+
Group: Applications/Emulators
Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz
# Source0-md5: 28d3be1d8981e7fd83c012ebf0d95bb1
+Patch0: bashisms.patch
URL: http://people.redhat.com/~rjones/virt-what/
# This is provided by the build root, but we make it explicit
# anyway in case this was dropped from the build root in future.
@@ -56,6 +57,7 @@ Current types of virtualization detected:
%prep
%setup -q
+%patch0 -p1
%build
%configure
diff --git a/bashisms.patch b/bashisms.patch
new file mode 100644
index 0000000..86103c3
--- /dev/null
+++ b/bashisms.patch
@@ -0,0 +1,32 @@
+--- /home/users/glen/rpm/packages/BUILD.x86_64-linux/virt-what-1.13/virt-what.in 2013-04-17 22:16:22.000000000 +0300
++++ ../virt-what.in 2013-09-01 00:34:41.362648435 +0300
+@@ -1,4 +1,4 @@
+-#!/bin/bash -
++#!/bin/sh -
+ # @configure_input@
+ # Copyright (C) 2008-2011 Red Hat Inc.
+ #
+@@ -33,12 +33,12 @@
+
+ VERSION="@VERSION@"
+
+-function fail {
++fail() {
+ echo "virt-what: $1" >&2
+ exit 1
+ }
+
+-function usage {
++usage() {
+ echo "virt-what [options]"
+ echo "Options:"
+ echo " --help Display this help"
+@@ -75,7 +75,7 @@
+
+ # Check we're running as root.
+
+-if [ "x$root" = "x" ] && [ "$EUID" -ne 0 ]; then
++if [ "x$root" = "x" ] && [ "$(id -u)" -ne 0 ]; then
+ fail "this script must be run as root"
+ fi
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/virt-what.git/commitdiff/a642c6190279c5472131d92392fa746a5bdd9736
More information about the pld-cvs-commit
mailing list