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>
maint
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 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() { get_repo_base() {
( (

View File

@ -21,12 +21,15 @@ if test -n "$OPTIONS_SPEC"; then
exec "$0" -h exec "$0" -h
} }


[ -n "$OPTIONS_KEEPDASHDASH" ] && parseopt_extra="--keep-dashdash" parseopt_extra=
parsed=$( [ -n "$OPTIONS_KEEPDASHDASH" ] &&
parseopt_extra="--keep-dashdash"

eval "$(
echo "$OPTIONS_SPEC" | echo "$OPTIONS_SPEC" |
git rev-parse --parseopt $parseopt_extra -- "$@" git rev-parse --parseopt $parseopt_extra -- "$@" ||
) && echo exit $?
eval "$parsed" || exit )"
else else
usage() { usage() {
die "Usage: $0 $USAGE" die "Usage: $0 $USAGE"