diff options
author | Thorsten Glaser <tg@mirbsd.org> | 2014-05-03 11:43:16 +0000 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-05-03 14:33:13 +0200 |
commit | 15055071e180f96a4309bf93d7a6dc923fdad22f (patch) | |
tree | 2e646238dd57844b780673669fa4866b9358e3d0 /scripts/update-patches | |
parent | 86e0e3c62349dfb43e66a78a57cf7110ef577a0f (diff) |
further optimisations
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'scripts/update-patches')
-rw-r--r-- | scripts/update-patches | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/update-patches b/scripts/update-patches index ee580c5cf..438cba2e1 100644 --- a/scripts/update-patches +++ b/scripts/update-patches @@ -95,14 +95,16 @@ while IFS= read -p -d '' -r file; do file=${file#./} #print -r -- "DEBUG: <$file>" >>/tmp/debug [[ ! -e $ORGDIST/$file && $patch_newfiles = 0 ]] && continue - [[ $file = configure && $ignore_autoconf = 1 ]] && continue - [[ $file = missing && $ignore_autoconf = 1 ]] && continue - [[ $file = depcomp && $ignore_autoconf = 1 ]] && continue - [[ $file = install-sh && $ignore_autoconf = 1 ]] && continue - [[ $file = aclocal.m4 && $ignore_autoconf = 1 ]] && continue - [[ $file = INSTALL && $ignore_autoconf = 1 ]] && continue - [[ $file = config.h.in && $ignore_autoconf = 1 ]] && continue - [[ $(basename $file) = Makefile.in && $ignore_autoconf = 1 ]] && continue + if (( ignore_autoconf )); then + [[ $file = configure ]] && continue + [[ $file = missing ]] && continue + [[ $file = depcomp ]] && continue + [[ $file = install-sh ]] && continue + [[ $file = aclocal.m4 ]] && continue + [[ $file = INSTALL ]] && continue + [[ $file = config.h.in ]] && continue + [[ ${file##*/} = Makefile.in ]] && continue + fi cmp -s "$ORGDIST/$file" "$WRKDIST/$file" && continue print -ru2 -- "Processing ${file}..." # look in patchdir for an existing patchfile matching this @@ -168,7 +170,7 @@ while IFS= read -p -d '' -r file; do done # Build a sensible name for the new patch file - patchname=patch-$(print -r -- "$file" | sed -e 's#[/.- ]#_#g') + patchname=patch-${file//[\/.- ]/_} print -ru2 -- "No patch-* found for $file, creating $patchname" ( cd "$D_BASE" && do_diff "$file" "$D_SUB.orig" "$D_SUB" ) >"$patchname" edit+=("$patchname") @@ -179,7 +181,7 @@ done cd "$PATCHDIR" for i in *; do [[ ! -f $i || $i = *@(.orig|.rej|~) ]] && continue - grep '^\\ No newline at end of file' $i >/dev/null && \ + grep '^\\ No newline at end of file' "$i" >/dev/null && \ print -ru2 -- "*** Patch $i needs manual intervention" found=0 for j in "${accounted[@]}"; do |