index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2017-03-07 19:55:05 +0100 |
---|---|---|
committer | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2017-03-07 20:37:54 +0100 |
commit | c53a3e80170dc9d45beeeb623edfbf0bd40799a7 (patch) | |
tree | 6cbeab8af72dfa40a7c445817fe208583df7e872 /lib/archroot.sh | |
parent | 45f87aa9d5b44e4ff2f73be6597d4024bcded8e3 (diff) |
-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 ]] +} |