OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.6 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../clip/getpatch.sh
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. tempfile=clip-patch.tar.gz.$$
  16. #location=ftp://ftp.linux.ru.net/mirrors/clip
  17. location=ftp://www.cis.by/pub/clip/pub/clip
  18. #location=ftp://ftp.itk.ru/pub/clip
  19. echo "get: $location/patch.tgz"
  20. if [ -f patch.tgz ]; then
  21. mv patch.tgz $tempfile
  22. else
  23. # wget $location/patch.tgz -O $tempfile
  24. curl $location/patch.tgz -o $tempfile
  25. if [ $? -ne 0 ]; then
  26. rm -f $tempfile
  27. exit
  28. fi
  29. fi
  30. release=$( tar zOxf $tempfile ./clip-prg/clip/release_version 2> /dev/null )
  31. [ -z "$release" ] && release=$( grep -e '^\[V\]' clip.desc | cut -d' ' -f2- | cut -d'-' -f1)
  32. seqno=$( tar zOxf $tempfile ./clip-prg/clip/seq_no.txt 2> /dev/null )
  33. echo "$release-$seqno"
  34. if [ -n "$release" -a -n "$seqno" ]; then
  35. archdir=../../../download/mirror/c/
  36. filename=clip-patch-$release-$seqno.tbz2
  37. if [ -f $archdir/$filename ]; then
  38. echo "INFO: $filename already grabbed"
  39. else
  40. zcat ./$tempfile | bzip2 - > $archdir/$filename
  41. echo "INFO: $filename catched!"
  42. fi
  43. rm -f ./$tempfile
  44. ( cd ../../..; sh misc/archive/Update.sh clip $release-$seqno )
  45. else
  46. echo "ERROR: take a look into ./$tempfile"
  47. fi