Guest User

Untitled

a guest
Nov 12th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. REMOVE="/usr/lfspackages/remove"
  4. check="$(curl -L -s http://ftp.gnu.org/gnu/nano/ | tr "<>" "\ " | grep "nano" | awk '{print $8}' | grep -v ".sig" | grep -v "/a" | sed 's/\.tar\.gz//' | sort -V | tail -n 1)"
  5.  
  6. configure() {
  7. ./configure --prefix=/usr \
  8. --sysconfdir=/etc \
  9. --enable-utf8 \
  10. --docdir=/usr/share/doc/$check
  11. }
  12.  
  13. build() {
  14. make
  15. make install | tee $REMOVE/$check.rm
  16. install -v -m644 doc/nanorc.sample /etc
  17. install -v -m644 doc/texinfo/nano.html /usr/share/doc/$check
  18. }
  19.  
  20. configure
  21.  
  22. if [ $? -ne 0 ]; then
  23. build
  24. else
  25. exit
  26. fi
Advertisement
Add Comment
Please, Sign In to add comment