Search Linux Wireless

[PATCH 3/3] compat-wireless: run refresh only on last applied directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



running "./scripts/admin-refresh.sh -n -p -c refresh" failed because the patches were applied but

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 scripts/admin-update.sh |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 99ab6c3..36cce31 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
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux