repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
target/ppc: init 'sregs' in kvmppc_put_books_sregs()
[qemu.git]
/
tests
/
avocado
/
virtiofs_submounts.py.data
/
guest-cleanup.sh
blob
729cb2d1a5ecc97c99c742dbc67b61837a7b919c
1
#!/bin/bash
2
3
function
print_usage
()
4
{
5
if
[
-n
"
$2
"
];
then
6
echo
"Error:
$2
"
7
echo
8
fi
9
echo
"Usage:
$1
<scratch dir>"
10
}
11
12
scratch_dir
=
$1
13
if
[
-z
"
$scratch_dir
"
];
then
14
print_usage
"
$0
"
'Scratch dir not given'
>&
2
15
exit
1
16
fi
17
18
cd
"
$scratch_dir
/share"
||
exit
1
19
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[@]}
"
25
26
sudo umount
-R
"
$mp
"
27
done
28
echo
29
30
echo
'Done.'