Created
July 15, 2012 15:48
-
-
Save fsmithred/3117522 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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