From d2d2deb96f6810c599555d2bfc9d11b76fa5a441 Mon Sep 17 00:00:00 2001 From: short <> Date: Tue, 17 Feb 2004 17:17:06 +0000 Subject: [PATCH] Support passing of binary commands to their "g*" equivs on Solaris. - ar(1) is not alias-able or function-able by shell through make(1). --- bin/ar | 2 ++ bin/passg | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 bin/ar create mode 100755 bin/passg diff --git a/bin/ar b/bin/ar new file mode 100755 index 0000000..70cf013 --- /dev/null +++ b/bin/ar @@ -0,0 +1,2 @@ +#! /bin/bash +exec passg "$0" "$@" diff --git a/bin/passg b/bin/passg new file mode 100755 index 0000000..4b63335 --- /dev/null +++ b/bin/passg @@ -0,0 +1,15 @@ +#! /bin/sh +arg0="$1" +shift +me="`basename "$arg0"`" +# FIXME: Why not: IFS=: for i in... +save_IFS="$IFS" +IFS=: +for i in $PATH;do + IFS="$save_IFS" + test -x "$i/$me" -a "$i/$me" != "$arg0" || continue + exec "$i/$me" "$@" + echo "NOTREACHED" && exit 1 + done +IFS="$save_IFS" +exec "g$me" "$@" -- 1.8.3.1