compat-drivers: fix copying of pending-stable patches
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 9 Mar 2013 01:03:32 +0000 (17:03 -0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 9 Mar 2013 01:05:22 +0000 (17:05 -0800)
This correctly copies the pending-stable patches for each
subsystem. When running ./scripts/admin-update.sh -s
we will now stats pending-stable for each subsystem:

compat-drivers code metrics

   1320032 - Total upstream lines of code being pulled

   network
   ----------------------------------------
      3105 - backport code changes
      2602 - backport code additions
       503 - backport code deletions
     15003 - backport from compat module
     18108 - total backport code
    1.3718 - % of code consists of backport work
       192 - Code changes brought in from pending-stable
       124 - Code additions brought in from pending-stable
        68 - Code deletions brought in from pending-stable
    0.0145 - % of code being cherry picked from pending-stable

   drm
   ----------------------------------------
       437 - backport code changes
       293 - backport code additions
       144 - backport code deletions
     15003 - backport from compat module
     15440 - total backport code
    1.1697 - % of code consists of backport work

Base tree: linux-stable.git
Base tree version: v3.9-rc1
compat.git: compat-v3.9-rc1-1
compat-drivers release: compat-drivers-v3.9-rc1-2-4-g9f5e67f-s
Code metrics archive: http://bit.ly/H6BTF7

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
scripts/admin-update.sh

index e072b123c0289c94688d573dfce1b2da5ba6b44a..528a22db76ae4020f132fe78bed7e2475d1596da 100755 (executable)
@@ -852,7 +852,8 @@ get_stable_patches() {
        echo -e "${GREEN}Purging old stable cherry picks... ${NORMAL}"
        rm -f ${LAST_DIR}/${STABLE_TARGET}/*.patch
 
-       if [ -f ${STABLE_TARGET}/*.patch ]; then
+       FOUND=$(find ${STABLE_TARGET}/ -maxdepth 1 -name \*.patch | wc -l)
+       if [ $FOUND -ne 0 ]; then
                cp ${STABLE_TARGET}/*.patch ${LAST_DIR}/${STABLE_TARGET}/
        else
                echo "No stable pending-stable $SUBSYS patches found on linux-next"