Extract --copy-packages-from argument.

master
Jordan Harband 2014-09-21 11:13:37 -07:00
parent 2e161fe414
commit eddbe15ee8
1 changed files with 8 additions and 1 deletions

7
nvm.sh
View File

@ -472,10 +472,17 @@ nvm() {
VERSION=`nvm_remote_version $provided_version` VERSION=`nvm_remote_version $provided_version`
ADDITIONAL_PARAMETERS='' ADDITIONAL_PARAMETERS=''
local PROVIDED_COPY_PACKAGES_FROM
local COPY_PACKAGES_FROM
while [ $# -ne 0 ] while [ $# -ne 0 ]
do do
if [ "~$(echo "$1" | cut -c 1-21)" = "~--copy-packages-from=" ]; then
PROVIDED_COPY_PACKAGES_FROM="$(echo "$1" | cut -c 22-)"
COPY_PACKAGES_FROM="$(nvm_version "$PROVIDED_COPY_PACKAGES_FROM")"
else
ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS $1" ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS $1"
fi
shift shift
done done