Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 13th, 2011  |  syntax: Bash  |  size: 0.98 KB  |  views: 142  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. pkgname=packer
  2. pkgver=20110301
  3. pkgrel=1
  4. pkgdesc="Bash wrapper for Pacman and AUR"
  5. url="http://github.com/bruenig/packer"
  6. license="GPL"
  7. arch=('any')
  8. makedepends=('git')
  9. depends=('grep' 'sed' 'bash' 'curl' 'pacman')
  10. optdepends=('sudo: install and update packages as non-root'
  11.             'pacman-color: colorized output')
  12. _gitroot='http://github.com/bruenig/packer.git'
  13.  
  14. build() {  # removed some extra white space
  15.     msg "Connecting to github GIT server...."  # no need to cd to "$srcdir" or ("$startdir/src") - we are already there
  16.  
  17.     if [ -d $pkgname ]; then  # same thing and: $pkgname = $_gitname ('packer')
  18.         cd $pkgname && git pull origin
  19.     else
  20.         git clone $_gitroot  # no quotes required ($_gitroot doesn't contain spaces)
  21.     fi
  22. }
  23.  
  24. package() {  # using the package() function
  25.     cd $pkgname
  26.     install -m 755 -D packer "$pkgdir/usr/bin/packer"  # "$pkgdir" = "$startdir/pkg"
  27.     install -m 644 -D packer.8 "$pkgdir/usr/share/man/man8/packer.8"
  28. }
clone this paste RAW Paste Data