target/ppc: init 'sregs' in kvmppc_put_books_sregs()
[qemu.git] / tests / avocado / virtiofs_submounts.py.data / guest-cleanup.sh
blob729cb2d1a5ecc97c99c742dbc67b61837a7b919c
1 #!/bin/bash
3 function print_usage()
5 if [ -n "$2" ]; then
6 echo "Error: $2"
7 echo
8 fi
9 echo "Usage: $1 <scratch dir>"
12 scratch_dir=$1
13 if [ -z "$scratch_dir" ]; then
14 print_usage "$0" 'Scratch dir not given' >&2
15 exit 1
18 cd "$scratch_dir/share" || exit 1
20 mps=(mnt*)
21 mp_i=0
22 for mp in "${mps[@]}"; do
23 mp_i=$((mp_i + 1))
24 printf "Unmounting %i/%i...\r" "$mp_i" "${#mps[@]}"
26 sudo umount -R "$mp"
27 done
28 echo
30 echo 'Done.'