index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | lib/archroot.sh | 8 |
diff --git a/lib/archroot.sh b/lib/archroot.sh index 7d7ab67..14417aa 100644 --- a/lib/archroot.sh +++ b/lib/archroot.sh @@ -12,3 +12,11 @@ check_root() { exec su root -c "$(printf ' %q' "${orig_argv[@]}")" fi } + +## +# usage : is_btrfs( $path ) +# return : whether $path is on a btrfs +## +is_btrfs() { + [[ -e "$1" && "$(stat -f -c %T "$1")" == btrfs ]] +} |