Posted By

freephys on 08/03/10


Tagged

refit


Versions (?)

enbale.sh


 / Published in: Bash
 

URL: http://refit.sourceforge.net/doc/c1s1_install.html

  1. #!/bin/bash
  2.  
  3. LOADERNAME="refit.efi"
  4.  
  5. expand_dir () {
  6. pushd "$1" >/dev/null
  7. DIR="`pwd`"
  8. popd >/dev/null
  9. }
  10.  
  11. expand_dir .
  12. if [ ! -f "$DIR/$LOADERNAME" ] ; then
  13. expand_dir "`dirname "$0"`"
  14. if [ ! -f "$DIR/$LOADERNAME" ] ; then
  15. echo "You must run enable.sh from the directory where you put $LOADERNAME"
  16. echo "or put enable.sh where $LOADERNAME is!"
  17. exit 1
  18. fi
  19. fi
  20. if [ "$(uname -p)" != "i386" ]; then
  21. echo "You must run enable.sh on an Intel-based Macintosh!"
  22. exit 1
  23. fi
  24. set -x
  25. sudo bless --folder "$DIR" --file "$DIR/$LOADERNAME" --labelfile "$DIR/refit.vollabel"

Report this snippet  

You need to login to post a comment.