mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 22:17:18 +00:00
24 lines
362 B
Bash
24 lines
362 B
Bash
pushd() {
|
|
command pushd "$@" > /dev/null
|
|
}
|
|
|
|
popd() {
|
|
command popd "$@" > /dev/null
|
|
}
|
|
|
|
spinned() {
|
|
"$@" &
|
|
pid=$!
|
|
spin=("-" "\\" "|" "/")
|
|
|
|
echo -n "${spin[0]}"
|
|
while kill -0 $pid &> /dev/null; do
|
|
for i in "${spin[@]}"; do
|
|
echo -ne "\b$i"
|
|
sleep 0.1
|
|
done
|
|
done
|
|
echo -ne "\b"
|
|
wait $pid
|
|
}
|