mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	bundled_pjproject: Make it easier to hack
There are times when you need to troubleshoot issues with bundled pjproject or add new features that need to be pushed upstream but... * The source directory created by extracting the pjproject tarball is not scanned for code changes so you have to keep forcing rebuilds. * The source directory isn't a git repo so you can't easily create patches, do git bisects, etc. * Accidentally doing a make distclean will ruin your day by wiping out the source directory, and your changes. * etc. This commit makes that easier. See third-party/pjproject/README-hacking.md for the details. ASTERISK-29824 Change-Id: Idb1251040affdab31d27cd272dda68676da9b268
This commit is contained in:
		
							
								
								
									
										6
									
								
								third-party/apply_patches
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								third-party/apply_patches
									
									
									
									
										vendored
									
									
								
							| @@ -6,6 +6,7 @@ if [ "$1" = "-q" ] ; then | ||||
| fi | ||||
|  | ||||
| PATCH=${PATCH:-patch} | ||||
| FIND=${FIND:-find} | ||||
|  | ||||
| patchdir=${1:?You must supply a patches directory} | ||||
| sourcedir=${2?:You must supply a source directory} | ||||
| @@ -20,12 +21,13 @@ if [ ! -d "$sourcedir" ] ; then | ||||
| 	exit 1 | ||||
| fi | ||||
|  | ||||
| if [ ! "$(ls -A $patchdir/*.patch 2>/dev/null)" ] ; then | ||||
| patches=$(${FIND} "$patchdir" -name "*.patch") | ||||
| if [ x"$patches" = x"" ] ; then | ||||
| 	echo "No patches in $patchdir"  >&2 | ||||
| 	exit 0 | ||||
| fi | ||||
|  | ||||
| for patchfile in "$patchdir"/*.patch ; do | ||||
| for patchfile in ${patches} ; do | ||||
| 	[ -z $quiet ] && echo "Applying patch $(basename $patchfile)" | ||||
| 	${PATCH} -d "$sourcedir" -p1 -s -i "$patchfile" || exit 1 | ||||
| done | ||||
|   | ||||
		Reference in New Issue
	
	Block a user