Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

oh-my-zsh-git PKGBUILD

By: a guest on Apr 16th, 2013  |  syntax: Bash  |  size: 1.46 KB  |  views: 59  |  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=oh-my-zsh-git
  2. pkgver=0.0.0
  3. pkgrel=1
  4. pkgdesc="A community-driven framework for managing your zsh configuration."
  5. arch=('any')
  6. url='https://github.com/robbyrussell/oh-my-zsh'
  7. license=('MIT')
  8. depends=('zsh')
  9. makedepends=('git')
  10. optdepends=('ruby: for some plugin functionality')
  11. install='oh-my-zsh-git.install'
  12.  
  13. _gitname=oh-my-zsh
  14. source=("$_gitname::git://github.com/robbyrussell/oh-my-zsh.git#branch=master")
  15. md5sums=('SKIP')
  16.  
  17. # pacman 4.1 - retrieve version from git
  18. pkgver() {
  19.   cd $_gitname
  20.  
  21.   d="$(git describe --always | sed 's/-/./g')"
  22.   h="$(git show --format="%h" HEAD)"
  23.  
  24.   if [[ "$d" = "$h" ]]; then
  25.     # If describe just delivers the short hash, set pkgver to <date>_<hash>,
  26.     # e.g. 20130412_85426a5
  27.     echo "$(git show --date=short --format="%cd_%h" | sed 's/-//g')"
  28.   else
  29.     echo "$d"
  30.   fi
  31. }
  32.  
  33. build() {
  34.   cd $_gitname
  35.  
  36.   # Fix the path to oh-my-zsh, and disable auto-updating.
  37.   sed -e'2c\ZSH=/usr/share/oh-my-zsh/'\
  38.       -e's/# \(DISABLE_AUTO_UPDATE="true"\)/\1/'\
  39.       templates/zshrc.zsh-template > zshrc
  40. }
  41.  
  42. package() {
  43.   mkdir -p $pkgdir/usr/share/oh-my-zsh
  44.   cd $_gitname
  45.  
  46.   # We don't need anything related to git in the package.
  47.   rm -rf .git*
  48.  
  49.   # The license should be in /usr/share/licenses.
  50.   install -D -m644 MIT-LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
  51.   rm MIT-LICENSE.txt
  52.  
  53.   # Copy everything else.
  54.   cp -r . $pkgdir/usr/share/oh-my-zsh/
  55. }
  56.  
  57. # vim:set ts=8 sts=2 sw=2 et:
clone this paste RAW Paste Data