diff options
author | Iru Cai <mytbk920423@gmail.com> | 2016-09-18 21:41:39 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2016-09-18 21:41:39 +0800 |
commit | fc1b28000a59a690f02bc2aa96d688242ded9534 (patch) | |
tree | 74b958956dc20624c9c0f02e6faebc8c9413e072 /functions.sh | |
parent | ef11ea4ded0865cce7f02f16d46f036388ffb230 (diff) | |
download | liveusb-builder-fc1b28000a59a690f02bc2aa96d688242ded9534.tar.xz |
add getdiskbypart() function
Diffstat (limited to 'functions.sh')
-rw-r--r-- | functions.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index 65bf6fb..664aa24 100644 --- a/functions.sh +++ b/functions.sh @@ -80,6 +80,10 @@ getuuid() { lsblk -n -o UUID "$1" } +getdiskbypart() { + lsblk -s --raw -o NAME -n "$1" | tail -n1 +} + as-root() { if [ "$UID" == 0 ]; then "$@" |