Created
May 30, 2020 17:38
-
-
Save nobiki/6c7d372a5b22af193861b2e69aeb5482 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
function spin() { | |
spinner="/|\\-/|\\-" | |
while : | |
do | |
for i in `seq 0 7` | |
do | |
echo -n "${spinner:$i:1}" | |
echo -en "\010" | |
sleep 0.1 | |
done | |
done | |
} | |
function run() { | |
echo -n "${1} ................... " | |
spin & | |
SPIN_PID=$! | |
trap "kill -9 $SPIN_PID" `seq 0 15` | |
. ./${1}.sh 1>/dev/null | |
echo "Done (${?})" | |
kill -9 $SPIN_PID | |
} | |
run test-include | |
run test-include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo aaaaaaa | |
sleep 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment