aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sed6
-rw-r--r--bin/wrapper.sh4
2 files changed, 4 insertions, 6 deletions
diff --git a/bin/sed b/bin/sed
index 2200bd15e1..352a3ca6e8 100755
--- a/bin/sed
+++ b/bin/sed
@@ -47,12 +47,10 @@ while getopts ne:f:$getopt_os opt; do
save "$OPTARG"
;;
i)
- save "$inplace_arg"
- continue
+ saved="$saved $inplace_arg"
;;
r)
- save "$extended_re_arg"
- continue
+ saved="$saved $extended_re_arg"
;;
\?)
exit 1
diff --git a/bin/wrapper.sh b/bin/wrapper.sh
index 3a93475b7f..d29d5b9c07 100644
--- a/bin/wrapper.sh
+++ b/bin/wrapper.sh
@@ -2,6 +2,8 @@ path_remove () {
echo $PATH | tr ':' '\n' | grep -v "^$1\$" | tr '\n' ':'
}
+PATH="$(path_remove $(dirname $0))"
+
quote(){
sed -e "s,','\\\\'',g; 1s,^,',; \$s,\$,',;" << EOF
$1
@@ -23,7 +25,5 @@ save () {
exec_real () {
eval set -- "$saved"
- scriptdir="$(dirname $0)"
- PATH="$(path_remove $scriptdir)"
exec "$(basename $0)" "$@"
}