sh-setup: don't let eval output to be shell-expanded.

The previous patch missed the same construct in git-clone.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
This commit is contained in:
Pierre Habouzit 2007-11-08 10:32:11 +01:00 committed by Junio C Hamano
parent cbea86fd14
commit e817e3e857
2 changed files with 9 additions and 6 deletions

View File

@ -36,7 +36,7 @@ usage() {
exec "$0" -h
}
eval `echo "$OPTIONS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?`
eval "$(echo "$OPTIONS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
get_repo_base() {
(

View File

@ -21,12 +21,15 @@ if test -n "$OPTIONS_SPEC"; then
exec "$0" -h
}
[ -n "$OPTIONS_KEEPDASHDASH" ] && parseopt_extra="--keep-dashdash"
parsed=$(
parseopt_extra=
[ -n "$OPTIONS_KEEPDASHDASH" ] &&
parseopt_extra="--keep-dashdash"
eval "$(
echo "$OPTIONS_SPEC" |
git rev-parse --parseopt $parseopt_extra -- "$@"
) &&
eval "$parsed" || exit
git rev-parse --parseopt $parseopt_extra -- "$@" ||
echo exit $?
)"
else
usage() {
die "Usage: $0 $USAGE"