CrunchBang Linux Pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

CrunchBang Linux Pastebin

Posted by Digit on Tue 26th Jun 19:31 (modification of post by view diff)
download | new post

  1. #! /bin/bash
  2. echo this is just a test portion of the witchcraft script major
  3. #############
  4. #############
  5. # driveprep
  6.  
  7. driveprep() {
  8. #this is the partition preparation function.  calls of it  aught imediately preceed the stageinstall function
  9. if [ -d /mnt/$a ] else mkdir /mnt
  10.  
  11. echo "enter name for your distro/mount-point and press [ENTER].  (this will make a directory of that name in /mnt.):"
  12. read -r DISTRONAME
  13. if [ -d /mnt/$DISTRONAME/$a ] else mkdir /mnt/$DISTRONAME
  14. cd /mnt/$DISTRONAME
  15.  
  16. echo "do you need to partition? (y/n):" && read
  17. [ "$REPLY" == "y" ] && partmanselector #calls the partition manager selection function "partmanselector"
  18. [ "$REPLY" == "n" ] && echo "ok, ready to go so..."
  19.  
  20. echo "where ya putting your root dir? (e.g. sda3):"
  21. read -r ROOTDEV
  22. mount /dev/$ROOTDEV /mnt/$DISTRONAME
  23.  
  24. echo "you want a separate boot right? (y):"
  25. read
  26. [ "$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
  27. # i wonder, if you can do "if $REPLY=y then else fi" or something like that.
  28.  
  29. echo "you want a separate home too? (y):"
  30. read
  31. [ "$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
  32.  
  33. echo drive prep complete;
  34. }
  35.  
  36. # driveprep
  37. #############
  38. #############
  39.  
  40. echo "ok here it starts."
  41. echo "trying driveprep"
  42. driveprep
  43. 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.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me