From: short <> Date: Tue, 17 Feb 2004 17:17:06 +0000 (+0000) Subject: Support passing of binary commands to their "g*" equivs on Solaris. X-Git-Tag: bp_liverpm~39 X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=d2d2deb96f6810c599555d2bfc9d11b76fa5a441;hp=a031f3a84a6ad28d7c411f011d026987baa9f2b7 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). --- 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" "$@"