summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-06-21 16:24:39 +0000
committerMiles Bader <miles@gnu.org>1997-06-21 16:24:39 +0000
commitb1f761e02556eb97f93f4c0a43ac7809f3ed05a6 (patch)
treeb579b93a4474b783fa6d9a491b241a3fc367eab4
parent282d28b8fe390e4de506874f6acca5cf2e235634 (diff)
If $OD & $AWK don't exist, try to get them from /usr/bin, so that
this script works under linux too.
-rwxr-xr-xsutils/e2os.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/sutils/e2os.sh b/sutils/e2os.sh
index fd233b56..10fe5087 100755
--- a/sutils/e2os.sh
+++ b/sutils/e2os.sh
@@ -20,12 +20,16 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
+USAGE="Usage: $0 DEVICE [OS]"
+
DD=${DD-/bin/dd}
OD=${OD-/bin/od}
SED=${SED-/bin/sed}
AWK=${AWK-/bin/gawk}
-USAGE="Usage: $0 DEVICE [OS]"
+# Hack to allow this script to work well under linux too.
+test ! -x "$OD" -a -x /usr/bin/od && OD=/usr/bin/od
+test ! -x "$AWK" -a -x /usr/bin/gawk && AWK=/usr/bin/gawk
while :; do
case "$1" in