2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/build/patch/buildpatch.sh
MDW c885c6917e Qual: Ignore most shellcheck annotations, fix some (#27452)
# Qual: Ignore most shellcheck annotations, fix some

Most shellcheck annotations are ignored - this is to make sure that ci
can work for existing scripts.

Some fixes were applied.

pre-commit script was beautyfied by temporarily suppressing the IFS= expression on 2 lines.
2024-01-12 21:03:08 +01:00

24 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#----------------------------------------------------------------------------
# \file 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