0install.sh 726 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # Script to create 0install archives
  3. # Get and set compilation settings
  4. ./configure --disable-debug --disable-docs --disable-profile --disable-tests > BUILD_INFO.txt
  5. # First compile
  6. make
  7. # Copy in distribution directory (if exists)
  8. dist=./dist
  9. if [ ! -d $dist ]; then
  10. mkdir $dist
  11. fi
  12. final_binairy_name=$dist/oclaunch
  13. cp ./_build/src/oclaunch.native $final_binairy_name
  14. # Move BUILD_INFO
  15. mv BUILD_INFO.txt ./$dist/
  16. cd $dist
  17. # Archive name
  18. name=oclaunch-v$(cat ../VERSION)_$(arch)
  19. mkdir $name
  20. # Put executable in it
  21. mv oclaunch BUILD_INFO.txt $name
  22. # XXX Debug
  23. tree
  24. # Create archive
  25. tar -cvaf $name.tar.lzma $name
  26. # Create stripped archive
  27. strip $final_binairy_name
  28. tar -cvaf $name_stripped.tar.lzma $name