2014-05-07 16:47:24 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-11-07 03:34:36 +08:00
|
|
|
die () { echo "$@" ; exit 1; }
|
2014-05-07 16:47:24 +08:00
|
|
|
|
2016-11-04 13:15:18 +08:00
|
|
|
\. ../../../nvm.sh
|
2014-05-07 16:47:24 +08:00
|
|
|
|
2015-01-19 15:55:26 +08:00
|
|
|
TEST_PATH=$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin:$NVM_DIR/versions/node/v0.12.0/bin:$NVM_DIR/versions/io.js/v1.0.0/bin
|
2014-05-07 16:47:24 +08:00
|
|
|
|
|
|
|
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
|
|
|
|
|
|
|
[ "$STRIPPED_PATH" = "/usr/bin:/usr/local/bin" ] || die "Not correctly stripped: $STRIPPED_PATH "
|
2016-12-23 00:03:41 +08:00
|
|
|
|
|
|
|
NVM_DIR='/#*.^$[]'
|
|
|
|
TEST_PATH="$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin:$NVM_DIR/versions/node/v0.12.0/bin:$NVM_DIR/versions/io.js/v1.0.0/bin"
|
|
|
|
|
|
|
|
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
|
|
|
|
|
|
|
[ "$STRIPPED_PATH" = "/usr/bin:/usr/local/bin" ] || die "Not correctly stripped: $STRIPPED_PATH "
|
2023-06-21 22:47:52 +08:00
|
|
|
|
|
|
|
TEST_PATH=":/a/b/bin::/c/d/bin:"
|
|
|
|
|
|
|
|
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
|
|
|
|
|
|
|
[ "$STRIPPED_PATH" = "$TEST_PATH" ] || die "Stripping does not preserve colons: $STRIPPED_PATH "
|