2016-04-18 05:26:09 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-07-07 15:00:59 +08:00
|
|
|
set -ex
|
|
|
|
|
2016-04-18 05:26:09 +08:00
|
|
|
cd ../..
|
|
|
|
mkdir v0.0.1
|
|
|
|
mkdir src/node-v0.0.1
|
|
|
|
|
|
|
|
sudo touch v0.0.1/sudo
|
|
|
|
|
|
|
|
. ./nvm.sh
|
|
|
|
|
2016-07-07 15:00:59 +08:00
|
|
|
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1 || echo)"
|
2016-04-18 05:26:09 +08:00
|
|
|
CHECK_FOR="Cannot uninstall, incorrect permissions on installation folder"
|
|
|
|
|
2016-07-07 15:00:59 +08:00
|
|
|
[ "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" ] || exit 1
|