diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-09-08 14:04:48 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-09-08 14:04:48 +0200 |
commit | c461205297d3ffde50f0a942c23a20d75bc098bc (patch) | |
tree | ed0e439a5cf9fcfe0bd2092eea8beab133677179 | |
parent | b460087213f9ace53002054795ec3a09a6a119ef (diff) |
Allow non-interactive selection of disk
Fixes #14
-rwxr-xr-x | artixinstall | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/artixinstall b/artixinstall index 2e27d86..0c41f09 100755 --- a/artixinstall +++ b/artixinstall @@ -14,7 +14,11 @@ pacman -S --needed --noconfirm parted fzf # Config questions # -DRIVE="/dev/$(lsblk | grep disk | fzf --disabled | awk '{print $1}')" +DRIVE=$1 + +if [ -z "${DRIVE}" ]; then + DRIVE="/dev/$(lsblk | grep disk | fzf --disabled | awk '{print $1}')" +fi if [[ "${DRIVE}" == "/dev/mmcblk"* ]] | [[ "${DRIVE}" == "/dev/nvme"* ]]; then PART_PREFIX="${DRIVE}p" |