Use `watch` to keepalive stdout while installing.

Jordan Harband 2016-05-26 08:48:15 +02:00
parent 4060de5285
commit 88ce2103f5
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
2 changed files with 15 additions and 1 deletions

View File

@ -63,3 +63,15 @@ make_fake_iojs() {
return 3 return 3
} }
} }
watch() {
$@ &
local JOB
JOB=$!
while true; do sleep 15; echo '* ping *'; done &
wait $JOB;
local EXIT_CODE
EXIT_CODE=$?
kill %2;
return $EXIT_CODE
}

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
. ../common.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../nvm.sh . ../../nvm.sh
@ -11,7 +13,7 @@ NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
[ -e ../../versions/io.js/$NVM_TEST_VERSION ] && rm -R ../../versions/io.js/$NVM_TEST_VERSION [ -e ../../versions/io.js/$NVM_TEST_VERSION ] && rm -R ../../versions/io.js/$NVM_TEST_VERSION
# Install from source # Install from source
nvm install -s $NVM_PREFIXED_TEST_VERSION || die "'nvm install -s $NVM_PREFIXED_TEST_VERSION' failed" (watch nvm install -s $NVM_PREFIXED_TEST_VERSION) || die "'nvm install -s $NVM_PREFIXED_TEST_VERSION' failed"
# Check # Check
[ -d ../../versions/io.js/$NVM_TEST_VERSION ] [ -d ../../versions/io.js/$NVM_TEST_VERSION ]