2024-01-10 19:47:29 +01:00
|
|
|
#!/bin/bash
|
2009-11-04 12:23:05 +01:00
|
|
|
#----------------------------------------------------------------------------
|
2025-01-05 14:46:26 +01:00
|
|
|
# \file dev/build/patch/buildpatch.sh
|
2009-11-04 12:23:05 +01:00
|
|
|
# \brief Create patch files
|
2011-05-28 19:47:45 +02:00
|
|
|
# \author (c)2009-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
2009-11-04 12:23:05 +01:00
|
|
|
#----------------------------------------------------------------------------
|
2009-01-30 19:45:22 +01:00
|
|
|
# This script can be used to build a patch after a developer has made
|
|
|
|
|
# changes on files in its Dolibarr tree.
|
2024-01-10 19:47:29 +01:00
|
|
|
# The output patch file can then be submitted on Dolibarr dev mailing-list,
|
2009-01-30 19:45:22 +01:00
|
|
|
# with explanation on its goal, for inclusion in main branch.
|
2009-11-04 12:23:05 +01:00
|
|
|
#----------------------------------------------------------------------------
|
2009-01-30 19:45:22 +01:00
|
|
|
|
2024-01-12 21:03:08 +01:00
|
|
|
# shellcheck disable=2086,2291
|
|
|
|
|
|
2009-11-04 12:23:05 +01:00
|
|
|
echo ----- Building patch file mypatch.patch -----
|
2011-05-28 19:47:45 +02:00
|
|
|
if [ -z "$1" ] || [ -z "$2" ];
|
2024-01-10 19:47:29 +01:00
|
|
|
then
|
|
|
|
|
echo Usage: buildpatch.sh original_dir_path modified_dir_path
|
|
|
|
|
echo Example: buildpatch.sh /mydirA/dolibarrold /mydirB/dolibarrnew
|
2011-05-28 19:47:45 +02:00
|
|
|
else
|
2024-01-10 19:47:29 +01:00
|
|
|
echo Build patch between \"$1\" and \"$2\"
|
|
|
|
|
diff -BNaur --exclude=CVS --exclude="*.patch" --exclude=".#*" --exclude="*~" --exclude="*.rej" --exclude="*.orig" --exclude="*.bak" --exclude=conf.php --exclude=documents $1 $2 > mypatch.patch
|
2011-05-28 19:47:45 +02:00
|
|
|
fi
|