From e9015fb30f31f6c403cbd112a73795c439125ade Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 6 Aug 2015 22:24:44 +0000 Subject: Made the sudo function FreeBSD compatible --- bash/.bashrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash/.bashrc b/bash/.bashrc index 3e9a0e2..e8a61fc 100755 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -67,7 +67,8 @@ if exists sudo; then if is_function $1 2> /dev/null; then tmpfile="/tmp/$(date +%s).sh" - echo "#!$usr/bin/env bash" > "$tmpfile" + echo "#!$usr/bin/bash" > "$tmpfile" + echo "usr=$usr" >> "$tmpfile" type $1 | grep -v "is a function" >> "$tmpfile" echo "$@" >> "$tmpfile" -- cgit v1.2.3