mirror of the now-defunct rocklinux.org
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.

32 lines
657 B

  1. #!/bin/bash
  2. #
  3. # Usage example: sh misc/archive/sm-instant-pkg.sh 'Clifford Wolf' m4
  4. if [ "$1" == "EDITOR" ]; then
  5. (
  6. cd "$2"
  7. echo; echo 'Version change:'
  8. svn diff package/*/$3/*.desc | grep '^.\[V\]'
  9. echo; echo 'Full diff:'
  10. svn diff package/*/$3/*.desc
  11. ) >> $4
  12. (
  13. cd "$2"
  14. echo
  15. echo "$SM_INSTANT_PKG_NAME:"
  16. pkgver=`grep '^\[V\]' package/*/$3/*.desc | awk '{ print $2; }'`
  17. echo " Updated $3 ($pkgver)"
  18. ) > $4.1
  19. cat $4.1 $4 > $4.2
  20. mv $4.2 $4; rm $4.1
  21. exec vi $4
  22. fi
  23. export SM_INSTANT_PKG_NAME="$1"
  24. shift
  25. for pkg; do
  26. export SVN_EDITOR="bash $PWD/misc/archive/sm-instant-pkg.sh EDITOR '$PWD' '$pkg'"
  27. sm instant package/*/$pkg
  28. done