commit
72fd8c970a
|
@ -1,6 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p ../../v0.2.3
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
[[ $PATH != *v0.2.3/*/bin* ]] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
|
||||
|
||||
. ../../nvm.sh
|
||||
nvm &&
|
||||
nvm use v0.2.3 &&
|
||||
[[ $PATH == *v0.2.3/*/bin* ]] || die "Failed to activate v0.2.3"
|
||||
|
||||
nvm deactivate &&
|
||||
! nvm
|
||||
[[ $PATH != *v0.2.3/*/bin* ]] || die "Failed to deactivate v0.2.3"
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
cd ../..
|
||||
|
||||
# Back up
|
||||
|
||||
type setopt >/dev/null 2>&1 && setopt NULL_GLOB
|
||||
type shopt >/dev/null 2>&1 && shopt -s nullglob
|
||||
rm -Rf v* src alias
|
||||
mkdir src alias
|
||||
)
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
cd ../..
|
||||
|
||||
# Back up
|
||||
|
||||
type setopt >/dev/null 2>&1 && setopt NULL_GLOB
|
||||
type shopt >/dev/null 2>&1 && shopt -s nullglob
|
||||
mkdir -p bak
|
||||
mv v* src alias bak || sleep 0s
|
||||
)
|
||||
|
|
|
@ -3,5 +3,8 @@
|
|||
# Remove temporary files
|
||||
(
|
||||
cd ../..
|
||||
|
||||
type setopt >/dev/null 2>&1 && setopt NULL_GLOB
|
||||
type shopt >/dev/null 2>&1 && shopt -s nullglob
|
||||
rm -fR v* src alias
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue