From d7cfde5190f4f4801b9595b3b575075ef87309c1 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 29 May 2010 15:44:32 +0200 Subject: [PATCH] compat-wireless: run refresh only on last applied directory Running "./scripts/admin-refresh.sh -n -p -c refresh" failed because patchRefresh refreshes and applies every patch form the series and then reverse them all. If a patch from the next series in an other directory depends on that it will not apply any more. Now only the last series/directory will be refresh. Signed-off-by: Hauke Mehrtens --- scripts/admin-update.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh index 99ab6c3418a0..36cce31010de 100755 --- a/scripts/admin-update.sh +++ b/scripts/admin-update.sh @@ -391,12 +391,6 @@ patchRefresh() { rm -rf patches.orig .pc $1/series } -if [[ "$REFRESH" = "y" ]]; then - for dir in $EXTRA_PATCHES; do - patchRefresh $dir - done -fi - ORIG_CODE=$(find ./ -type f -name \*.[ch] | egrep -v "^./compat/|include/linux/compat" | xargs wc -l | tail -1 | awk '{print $1}') @@ -404,6 +398,14 @@ printf "\n${CYAN}compat-wireless code metrics${NORMAL}\n\n" > $CODE_METRICS printf "${PURPLE}%10s${NORMAL} - Total upstream code being pulled\n" $ORIG_CODE >> $CODE_METRICS for dir in $EXTRA_PATCHES; do + LAST_ELEM=$dir +done + +for dir in $EXTRA_PATCHES; do + if [[ $LAST_ELEM = $dir && "$REFRESH" = y ]]; then + patchRefresh $dir + fi + FOUND=$(find $dir/ -name \*.patch | wc -l) if [ $FOUND -eq 0 ]; then continue -- 2.30.2