Skip to content

Commit

Permalink
Further fixes for lots of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Aug 17, 2014
1 parent 5d7d62e commit c210f65
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions contrib/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
# install.sh 755 src1 src2 ... dest

PERMS=$1
shift 1
shift

LEN=$(($#-1))
ARGS=""

i=1
while [ $i -lt $LEN ]; do
ARGS="$ARGS $(eval echo \$$i)"
i=$((i+1))
while [ $# -gt 1 ]; do
ARGS="$ARGS $1"
shift
done
DEST=$(eval echo \$$#)
DEST=$1

for SRC in $ARGS; do
# Copy file, then take output of the form 'src' -> 'dest' and get only 'dest'
Expand Down

0 comments on commit c210f65

Please sign in to comment.