HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: /home4/cca63905/public_html/guiaweb/dev/build/patch/buildpatch.sh
#!/bin/bash
#----------------------------------------------------------------------------
# \file         dev/build/patch/buildpatch.sh
# \brief        Create patch files
# \author       (c)2009-2011 Laurent Destailleur  <eldy@users.sourceforge.net>
#----------------------------------------------------------------------------
# This script can be used to build a patch after a developer has made
# changes on files in its Dolibarr tree.
# The output patch file can then be submitted on Dolibarr dev mailing-list,
# with explanation on its goal, for inclusion in main branch.
#----------------------------------------------------------------------------

# shellcheck disable=2086,2291

echo ----- Building patch file mypatch.patch -----
if [ -z "$1" ] || [ -z "$2" ];
then
	echo Usage:   buildpatch.sh  original_dir_path    modified_dir_path
	echo Example: buildpatch.sh  /mydirA/dolibarrold  /mydirB/dolibarrnew
else
	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
fi