From 75e728bf5cf680e5af1143e6fe3b6c701176820a Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Mon, 18 Jan 2016 14:23:39 -0600 Subject: [PATCH] Fixes for Solaris hosts --- .bashrc | 2 ++ bin/svn-wrapper | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index bcb6bbf..29ced28 100644 --- a/.bashrc +++ b/.bashrc @@ -278,6 +278,8 @@ if [ "$UNAME" = SunOS ]; then test -x /usr/gnu/bin/grep && alias grep="/usr/gnu/bin/grep" test -x /usr/gnu/bin/sed && alias sed="/usr/gnu/bin/sed" test -x /usr/gnu/bin/awk && alias awk="/usr/gnu/bin/awk" + test -x /usr/xpg4/bin/sed && alias sed="/usr/xpg4/bin/sed" + test -x /usr/xpg4/bin/awk && alias awk="/usr/xpg4/bin/awk" fi # alias csh-style "rebash" to bash equivalent diff --git a/bin/svn-wrapper b/bin/svn-wrapper index f2c3287..209d510 100755 --- a/bin/svn-wrapper +++ b/bin/svn-wrapper @@ -2,7 +2,14 @@ # Wrapper script around SVN to support using $PAGER and other handy tools. : ${PAGER=missing} +: ${UNAME=`uname`} export PAGER +SED=sed +# for Solaris, use GNU versions of core utils +if [ "$UNAME" = SunOS ]; then + test -x /usr/gnu/bin/sed && SED="/usr/gnu/bin/sed" + test -x /usr/xpg4/bin/sed && SED="/usr/xpg4/bin/sed" +fi set_colors() { @@ -131,7 +138,7 @@ case $1 in exec svn "$@" | $PAGER ;; status|stat|st) - exec svn "$@" | sed "$sed_svn_st_color" | $PAGER + exec svn "$@" | $SED "$sed_svn_st_color" | $PAGER ;; *) exec svn "$@" -- 2.45.2