diff options
Diffstat (limited to 'functions.sh')
-rw-r--r-- | functions.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index dba6d9d..a3b3a8d 100644 --- a/functions.sh +++ b/functions.sh @@ -135,6 +135,20 @@ umount_iso() { udevil umount "$ISOMNT" } +# iso_extract: extract files from iso image to destination path +# usage: iso_extract <isofile> <patterns> <dest> +iso_extract() { + local isofile="$1" + local patterns=() + shift + while [ "$#" -gt 1 ]; do + patterns+=("$1") + shift + done + local dest="$1" + bsdtar -x -f "$isofile" -C "$dest" "${patterns[@]}" +} + getuuid() { lsblk -n -o UUID "$1" } |