Shifted back to string return
This commit is contained in:
parent
c0b85ec0fd
commit
e46c7358b5
@ -1,9 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
### GLOBALS ###
|
||||
declare -A DISKS
|
||||
|
||||
### GLOBALS ###
|
||||
#!/bin/bash
|
||||
|
||||
echo_rgb() {
|
||||
# Echo a colored string to the terminal based on rgb values
|
||||
@ -128,20 +124,15 @@ get_available_disks() {
|
||||
|
||||
done <<< "$(lsblk)"
|
||||
|
||||
local ret_val
|
||||
# Build the array into a string, yes this is less efficient, but easier to modify in the future if something changes
|
||||
local disk_num
|
||||
disk_num=0
|
||||
for disk in "${available_disks[@]}"; do
|
||||
DISKS["${disk_num}"]+="${disk}"
|
||||
ret_val="${ret_val} ${disk}"
|
||||
done
|
||||
|
||||
echo "${ret_val}"
|
||||
}
|
||||
|
||||
#choose_disk() {
|
||||
#
|
||||
#}
|
||||
|
||||
install() {
|
||||
|
||||
local available_disks
|
||||
@ -150,8 +141,8 @@ install() {
|
||||
available_disks="$(get_available_disks)"
|
||||
|
||||
log "info" "Available disks: "
|
||||
for disk in "${!DISKS[@]}"; do
|
||||
echo " - $(important "${DISKS[disk]}")"
|
||||
for disk in "${available_disks[@]}"; do
|
||||
echo "- $(important "${disk}")"
|
||||
done
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user