Project

General

Profile

« Previous | Next » 

Revision 9443

lib/sh/util.sh: sed: use case statement instead of test to determine flag letter, to easily allow matching multiple `uname` OSes or adding additional flag letters

View differences:

lib/sh/util.sh
161 161
	echo "$result"
162 162
}
163 163

  
164
sed_cmd="command sed -$(test "$(uname)" = Darwin && echo E || echo r)"
164
sed_cmd="command sed -`case "$(uname)" in Darwin) echo E;; *) echo r;; esac`"
165 165
alias sed="$sed_cmd"
166 166

  
167 167
fi # load new aliases

Also available in: Unified diff