upload.sh 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. #
  3. # Copyright 2010, 2011 wkhtmltopdf authors
  4. #
  5. # This file is part of wkhtmltopdf.
  6. #
  7. # wkhtmltopdf is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Lesser General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # wkhtmltopdf is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public License
  18. # along with wkhtmltopdf. If not, see <http:#www.gnu.org/licenses/>.
  19. cd "release-$1"
  20. wget http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py -O googlecode_upload.py
  21. function ul() {
  22. source ../upload.conf
  23. python googlecode_upload.py -u "$USER" -w "$PASS" -s "$1" -p "wkhtmltopdf" -l "$2" "$3"
  24. }
  25. function checkf() {
  26. if ! [ -f "$1" ] ; then
  27. echo "$1 is missing"
  28. exit 1;
  29. fi
  30. }
  31. checkf "wkhtmltopdf-$1.tar.bz2"
  32. checkf "wkhtmltopdf-$1-static-i386.tar.bz2"
  33. checkf "wkhtmltopdf-$1-static-amd64.tar.bz2"
  34. checkf "wkhtmltox-$1-installer.exe"
  35. checkf "wkhtmltoimage-$1-static-i386.tar.bz2"
  36. checkf "wkhtmltoimage-$1-static-amd64.tar.bz2"
  37. checkf "libwkhtmltox-$1.zip"
  38. checkf "libwkhtmltox-$1-i386.tar.bz2"
  39. checkf "libwkhtmltox-$1-amd64.tar.bz2"
  40. ul "wkhtmltopdf-$1 Source" "Type-Source,OpSys-All,Featured" "wkhtmltopdf-$1.tar.bz2"
  41. ul "wkhtmltopdf-$1 Linux Static Binary (i368)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltopdf-$1-static-i386.tar.bz2"
  42. ul "wkhtmltopdf-$1 Linux Static Binary (amd64)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltopdf-$1-static-amd64.tar.bz2"
  43. ul "wkhtmltox-$1 Windows Installer (i368)" "Type-Installer,OpSys-Windows,Featured" "wkhtmltox-$1-installer.exe"
  44. ul "wkhtmltoimage-$1 Linux Static Binary (i368)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltoimage-$1-static-i386.tar.bz2"
  45. ul "wkhtmltoimage-$1 Linux Static Binary (amd64)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltoimage-$1-static-amd64.tar.bz2"
  46. ul "libwkhtmltox-$1 Linux Static Library (i368)" "Type-Archive,OpSys-Linux" "libwkhtmltox-$1-i386.tar.bz2"
  47. ul "libwxhtmltox-$1 Linux Static Library (amd64)" "Type-Archive,OpSys-Linux" "libwkhtmltox-$1-amd64.tar.bz2"
  48. ul "libwkhtmltox-$1 Windows Static Library (i368)" "Type-Archive,OpSys-Windows" "libwkhtmltox-$1.zip"