Skip to content

Commit

Permalink
Fixed quoting in wrapper shell scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
sghctoma authored and radare committed Nov 2, 2015
1 parent 9a8263e commit c3d64d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ purge-doc:
rm -f "${DESTDIR}${MANDIR}/man1/r2.1"

user-wrap=echo "\#!/bin/sh" > ~/bin/"$1" \
; echo "${PWD}/env.sh '${PREFIX}' '$1' \$$@" >> ~/bin/"$1" \
; echo "${PWD}/env.sh '${PREFIX}' '$1' \"\$$@\"" >> ~/bin/"$1" \
; chmod +x ~/bin/"$1" ;

user-install:
Expand Down
8 changes: 7 additions & 1 deletion env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,11 @@ if [ -z "$*" ]; then
echo "==> Back to system shell..."
echo
else
eval $new_env $*
if [ $# -gt 1 ]; then
par=""
for p in `seq 1 $(($#-1))`; do par=$par"\$$p "; done
eval $new_env $par "\"\$$#\""
else
eval $new_env $*
fi
fi

0 comments on commit c3d64d6

Please sign in to comment.