compat-drivers: add support for uploading stable releases
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 20 Oct 2012 00:53:05 +0000 (17:53 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 20 Oct 2012 00:56:40 +0000 (17:56 -0700)
This adds support for uploading stable compat-drivers releases.
The new stable releases will go on:

http://www.kernel.org/pub/linux/kernel/projects/backports/stable/

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

index c12831c20a37f45d06358d91e31ed75a638fbfc0..1f3de75037d316ed6925eaf365421c98023a48a1 100755 (executable)
@@ -278,6 +278,19 @@ if [[ "$BASE_TREE" = "linux-next" ]]; then
        fi
 
        kup put ${RELEASE}.tar.bz2 ${RELEASE}.tar.asc ${KORG_BACKPORT}/${YEAR}/${MONTH}/${DAY}/
+elif [[ "$BASE_TREE" = "linux-stable" ]]; then
+       TARGET_STABLE="${KORG_BACKPORT}/stable/${TARGET_TAG}"
+
+       kup mkdir ${KORG_BACKPORT}/stable > /dev/null 2>&1
+       kup mkdir ${TARGET_STABLE} > /dev/null 2>&1
+
+       kup ls ${TARGET_STABLE} | grep ${RELEASE}.tar.bz2 > /dev/null 2>&1
+       if [[ $? -eq 0 ]]; then
+               echo -e "File ${TARGET_STABLE}/${RELEASE}.tar.bz2${NORMAL} already exists"
+       fi
+
+       kup put ${RELEASE}.tar.bz2 ${RELEASE}.tar.asc ${TARGET_STABLE}
 else
-       echo XXX
+       echo "Unsupported release type: $BASE_TREE"
+       exit 1
 fi