upload.sh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #!/bin/bash
  2. #
  3. # Copyright 2010 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 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 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. if ! [ -f "wkhtmltopdf-$1.tar.lzma" ] ||
  26. ! [ -f "wkhtmltopdf-$1-static-i386.tar.lzma" ] ||
  27. ! [ -f "wkhtmltopdf-$1-static-amd64.tar.lzma" ] ||
  28. ! [ -f "wkhtmltox-$1-installer.exe" ] ||
  29. ! [ -f "wkhtmltoimage-$1-static-i386.tar.lzma" ] ||
  30. ! [ -f "wkhtmltoimage-$1-static-amd64.tar.lzma" ] ||
  31. ! [ -f "libwkhtmltox-$1.zip" ] ||
  32. ! [ -f "libwkhtmltox-$1-i386.tar.lzma" ] ||
  33. ! [ -f "libwkhtmltox-$1-amd64.tar.lzma" ] ; then
  34. echo "File Missing"
  35. exit 1
  36. fi
  37. ul "wkhtmltopdf-$1 Source" "Type-Source,OpSys-All,Featured" "wkhtmltopdf-$1.tar.lzma"
  38. ul "wkhtmltopdf-$1 Linux Static Binary (i368)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltopdf-$1-static-i386.tar.lzma"
  39. ul "wkhtmltopdf-$1 Linux Static Binary (amd64)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltopdf-$1-static-amd64.tar.lzma"
  40. ul "wkhtmltox-$1 Windows Installer (i368)" "Type-Installer,OpSys-Windows,Featured" "wkhtmltox-$1-installer.exe"
  41. ul "wkhtmltoimage-$1 Linux Static Binary (i368)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltoimage-$1-static-i386.tar.lzma"
  42. ul "wkhtmltoimage-$1 Linux Static Binary (amd64)" "Type-Executable,OpSys-Linux,Featured" "wkhtmltoimage-$1-static-amd64.tar.lzma"
  43. ul "libwkhtmltox-$1 Linux Static Library (i368)" "Type-Archive,OpSys-Linux" "libwkhtmltox-$1-i386.tar.lzma"
  44. ul "libwxhtmltox-$1 Linux Static Library (amd64)" "Type-Archive,OpSys-Linux" "libwkhtmltox-$1-amd64.tar.lzma"
  45. ul "libwkhtmltox-$1 Windows Static Library (i368)" "Type-Archive,OpSys-Windows" "libwkhtmltox-$1.zip"