Skip to content

Instantly share code, notes, and snippets.

@fsmithred
Created July 15, 2012 15:48
Show Gist options
  • Save fsmithred/3117522 to your computer and use it in GitHub Desktop.
Save fsmithred/3117522 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
sep_boot="yes"
# Show the partition list in a menu, and choose one for /boot
choose_boot () {
boot_selection=$(find /dev -mindepth 1 -maxdepth 1 -name "*[sh]d[a-z][1-9]*" \
| sort | awk '{print "\n" $0 }' \
| yad --list --title="/boot partition" --text="Select a partition for /boot." \
--column ' ' --column 'Partitions' --height=380 --width=150)
echo "boot_selection is $boot_selection"
boot_dev=$(echo $boot_selection | awk -F"|" '{ print $2 }')
echo " boot_dev is $boot_dev"
}
if [[ $sep_boot = "yes" ]]; then
choose_boot
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment