Posted by Digit on Tue 26th Jun 19:31 (modification of post by view diff)
download | new post
- #! /bin/bash
- echo this is just a test portion of the witchcraft script major
- #############
- #############
- # driveprep
- driveprep() {
- #this is the partition preparation function. calls of it aught imediately preceed the stageinstall function
- if [ -d /mnt/$a ] else mkdir /mnt
- echo "enter name for your distro/mount-point and press [ENTER]. (this will make a directory of that name in /mnt.):"
- read -r DISTRONAME
- if [ -d /mnt/$DISTRONAME/$a ] else mkdir /mnt/$DISTRONAME
- cd /mnt/$DISTRONAME
- echo "do you need to partition? (y/n):" && read
- [ "$REPLY" == "y" ] && partmanselector #calls the partition manager selection function "partmanselector"
- [ "$REPLY" == "n" ] && echo "ok, ready to go so..."
- echo "where ya putting your root dir? (e.g. sda3):"
- read -r ROOTDEV
- mount /dev/$ROOTDEV /mnt/$DISTRONAME
- echo "you want a separate boot right? (y):"
- read
- [ "$REPLY" == "y" ] && mkdir /mnt/$DISTRONAME/boot && echo "where ya putting your boot dir? (e.g. sda1):" && read -r BOOTDEV && mount /dev/$BOOTDEV /mnt/$DISTRONAME/boot
- # i wonder, if you can do "if $REPLY=y then else fi" or something like that.
- echo "you want a separate home too? (y):"
- read
- [ "$REPLY" == "y" ] && mkdir /mnt/$DISTRONAME/home && echo "where ya putting your home dir? (e.g. sda1):" && read -r HOMEDEV && mount /dev/$HOMEDEV /mnt/$DISTRONAME/home
- echo drive prep complete;
- }
- # driveprep
- #############
- #############
- echo "ok here it starts."
- echo "trying driveprep"
- driveprep
- echo "ok it ends here."
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.