Skip to content

Instantly share code, notes, and snippets.

@antonalekseev
Last active August 20, 2019 15:49
Show Gist options
  • Select an option

  • Save antonalekseev/bd4da5c20528a63f29a74bda7b08b966 to your computer and use it in GitHub Desktop.

Select an option

Save antonalekseev/bd4da5c20528a63f29a74bda7b08b966 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -uo pipefail
hostname="archlinux"
user="user"
password="secret"
device_list=$(lsblk -dplnx size -o name,size,type|grep -Ev 'boot|rom|loop'|tr -s '[:space:]'|cut -d' ' -f1,2|paste -s -)
device=$(dialog --stdout --menu "Select installation disk" 0 0 0 ${device_list}) || exit 1
clear
echo "$device"
echo "$device"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment