jmunsch

lua / e_links bash install script broken

May 18th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.29 KB | None | 0 0
  1. #/bin/sh
  2. sudo apt-get install curl
  3. curl -R -O http://www.lua.org/ftp/lua-5.0.tar.gz
  4. tar zxf lua-5.0.tar.gz
  5. cd lua-5.0
  6. sudo make linux test
  7. sudo apt-get install libncurses5-dev
  8. sudo apt-get install libevent-openssl-2.0-5
  9. sudo apt-get install libssl-dev
  10. curl -R -O elinks.or.cz/download/elinks-current-0.12.tar.gz
  11. tar zxf elinks-current-0.12.tar.gz
  12. cd elinks-current-0.12*
  13.  
  14. ##################
  15. # just an idea for editing a bunch of lines in a file/files
  16. ##################
  17. # starts here
  18. ##
  19.  
  20. config[0]='#some config line'
  21. config[1]='#Removed Comments'
  22. config[2]='#YET_ANOTHER_+CONFIG='
  23. # single and double quotes matter when nesting variables '$var' vs "$var" especially for whitespace/special characters
  24. # iterating for loop ... http://www.cyberciti.biz/faq/bash-iterate-array/
  25. for var in "${config[@]}"
  26.     do
  27.         LINE="$var"
  28.         #string slicing ${str:0:${#str} - 20}
  29.         #${[variableName]:[startIndex]:[length]}
  30.         # len of string is ${#str} ... http://tldp.org/LDP/abs/html/string-manipulation.html
  31.         NEW_LINE="${LINE:1}"
  32.        
  33.         echo "$NEW_LINE"
  34.         # replace lines in some file
  35.         #sed "s/'$NEW_LINE'/'$LINE'/g" /some/path/to/file
  36.     done
  37. ##
  38. # idea Ends here
  39. ##################################
  40. ./configure && sudo make && sudo make install
Advertisement
Add Comment
Please, Sign In to add comment