buildpatch.sh 1.1 KB

123456789101112131415161718192021
  1. #/bin/ksh
  2. #----------------------------------------------------------------------------
  3. # \file build/patch/buildpatch.sh
  4. # \brief Create patch files
  5. # \author (c)2009-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  6. #----------------------------------------------------------------------------
  7. # This script can be used to build a patch after a developer has made
  8. # changes on files in its Dolibarr tree.
  9. # The output patch file can then be submited on Dolibarr dev mailing-list,
  10. # with explanation on its goal, for inclusion in main branch.
  11. #----------------------------------------------------------------------------
  12. echo ----- Building patch file mypatch.patch -----
  13. if [ -z "$1" ] || [ -z "$2" ];
  14. then
  15. echo Usage: buildpatch.sh original_dir_path modified_dir_path
  16. echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
  17. else
  18. echo Build patch between \"$1\" and \"$2\"
  19. diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
  20. fi