compat-wireless: fix target kernel expecations on gen-stable-release.sh
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 2 Jun 2010 00:15:39 +0000 (17:15 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 2 Jun 2010 00:22:46 +0000 (17:22 -0700)
We were computing the target kernel too early, we need to do this
*after* we have updated the stable tree.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
scripts/gen-stable-release.sh

index 3a79da17a0c474d3a7e564332b254dd535f94ac6..bf11b1845660dfdde40a312219031ef7c9536879 100755 (executable)
@@ -91,14 +91,6 @@ COMPAT_WIRELESS_BRANCH=$(git branch | grep \* | awk '{print $2}')
 cd $GIT_TREE
 # --abbrev=0 on branch should work but I guess it doesn't on some releases
 EXISTING_BRANCH=$(git branch | grep \* | awk '{print $2}')
-# This is a super hack, but let me know if you figure out a cleaner way
-TARGET_KERNEL_RELEASE=$(make VERSION="linux-2" EXTRAVERSION=".y" kernelversion)
-
-if [[ $COMPAT_WIRELESS_BRANCH != $TARGET_KERNEL_RELEASE ]]; then
-       echo "You are not on the branch $COMPAT_WIRELESS_BRANCH on compat-wireless,"
-       echo "try changing to that first."
-       exit
-fi
 
 case $LOCAL_BRANCH in
 "master") # Preparing a new stable compat-wireless release based on an RC kernel
@@ -127,6 +119,21 @@ case $LOCAL_BRANCH in
        ;;
 esac
 
+# At this point your linux-2.6-allstable tree should be up to date
+# with the target kernel you want to use. Lets now make sure you are
+# on matching compat-wireless branch.
+
+# This is a super hack, but let me know if you figure out a cleaner way
+TARGET_KERNEL_RELEASE=$(make VERSION="linux-2" EXTRAVERSION=".y" kernelversion)
+
+if [[ $COMPAT_WIRELESS_BRANCH != $TARGET_KERNEL_RELEASE ]]; then
+       echo -e "You are on the compat-wireless ${GREEN}${COMPAT_WIRELESS_BRANCH}${NORMAL} but are "
+       echo -en "on the ${RED}${TARGET_KERNEL_RELEASE}${NORMAL} branch... "
+       echo -e "try changing to that first."
+       exit
+fi
+
+
 # We should now be on the branch we want
 KERNEL_RELEASE=$(git describe --abbrev=0 | sed -e 's/v//g')
 RELEASE="compat-wireless-$KERNEL_RELEASE"