fs_make_btrfs
This commit is contained in:
parent
378e0e530f
commit
fdffd7fb08
1 changed files with 20 additions and 0 deletions
20
bash/fs.sh
20
bash/fs.sh
|
@ -1,3 +1,23 @@
|
|||
fs_make_btrfs() {
|
||||
local device="${1}"
|
||||
local label="${2}"
|
||||
local uuid="${3}"
|
||||
if [ -b "${device}" ]; then
|
||||
set -- \
|
||||
--force \
|
||||
--checksum "sha256"
|
||||
if [ -n "${label}" ]; then
|
||||
set -- "${@}" \
|
||||
--label "${label}"
|
||||
fi
|
||||
if [ -n "${uuid}" ]; then
|
||||
set -- "${@}" \
|
||||
--uuid "${uuid}"
|
||||
fi
|
||||
mkfs.btrfs "${@}" "${device}"
|
||||
fi
|
||||
}
|
||||
|
||||
fs_make_fat() {
|
||||
local device="${1}"
|
||||
local name="${2}"
|
||||
|
|
Loading…
Reference in a new issue