Merge branch 'master' of http://git.nethack.net/rob/bare
This commit is contained in:
commit
307948c272
13
bare.sh
13
bare.sh
|
@ -465,10 +465,17 @@ function restorecmd_help() {
|
|||
}
|
||||
|
||||
function is_mounted() {
|
||||
local dir dev1 dev2 rv
|
||||
local dir dev1 dev2 rv formatarg
|
||||
dir="$1"
|
||||
dev1=$(stat -f %d $dir 2>/dev/null)
|
||||
dev2=$(stat -f %d $dir/.. 2>/dev/null)
|
||||
|
||||
if [[ $(uname -s) == "Linux" ]]; then
|
||||
formatarg="-c"
|
||||
else
|
||||
formatarg="-f"
|
||||
fi
|
||||
|
||||
dev1=$(stat $formatarg %d $dir 2>/dev/null)
|
||||
dev2=$(stat $formatarg %d $dir/.. 2>/dev/null)
|
||||
if [[ $dev1 == $dev2 ]]; then
|
||||
rv=1
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue