Advertisement
Guest User

Untitled

a guest
Jan 31st, 2015
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #!/bin/bash
  2. # Simple script to automate the build of RPMs
  3.  
  4. DIR='rpmbuild'
  5. SPECFILE='zookeeper.spec'
  6.  
  7. echo "==> Cleaning $DIR"
  8. rm -Rf ./$DIR
  9. echo "==> Generating $DIR"
  10. mkdir -p ./$DIR/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
  11.  
  12. echo "==> Placing files on the right path"
  13. cp $SPECFILE ./$DIR/SPECS
  14. cp -f * ./$DIR/SOURCES
  15.  
  16. echo "==> Downloading sources"
  17. spectool -g $SPECFILE -C $DIR/SOURCES
  18.  
  19. echo "==> Building"
  20. rpmbuild --clean -ba --define "_topdir $(pwd)/$DIR" ./$DIR/SPECS/$SPECFILE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement