diff options
author | Karel Zak | 2012-01-19 13:15:03 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-19 13:15:03 +0100 |
commit | abbc7b4a14287746253d47218576410879839597 (patch) | |
tree | 9a1237c9f428e516889fd58d95e01fadbd8d41dc /tools | |
parent | build-sys: add ko-release-push script (diff) | |
download | kernel-qcow2-util-linux-abbc7b4a14287746253d47218576410879839597.tar.gz kernel-qcow2-util-linux-abbc7b4a14287746253d47218576410879839597.tar.xz kernel-qcow2-util-linux-abbc7b4a14287746253d47218576410879839597.zip |
build-sys: improve ko-release-* scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ko-release-gen | 8 | ||||
-rwxr-xr-x | tools/ko-release-push | 16 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tools/ko-release-gen b/tools/ko-release-gen index 46d140f95..b95af2ea9 100755 --- a/tools/ko-release-gen +++ b/tools/ko-release-gen @@ -49,6 +49,14 @@ function add_file { local sig=$(echo "$name" | sed 's/\.tar\.xz/.tar.sign/') xz -d -c $subdir/$name | $GPG_CMD --output $subdir/$sig ;; + *.tar.gz) + local sig=$(echo "$name" | sed 's/\.tar\.gz/.tar.sign/') + gzip -d -c $subdir/$name | $GPG_CMD --output $subdir/$sig + ;; + *.tar.bz2) + local sig=$(echo "$name" | sed 's/\.tar\.bz2/.tar.sign/') + bzip2 -d -c $subdir/$name | $GPG_CMD --output $subdir/$sig + ;; *) local sig="${name}.sign" cat $subdir/$name | $GPG_CMD --output $subdir/$sig diff --git a/tools/ko-release-push b/tools/ko-release-push index 0c500ac8c..ebeddbb63 100755 --- a/tools/ko-release-push +++ b/tools/ko-release-push @@ -2,8 +2,11 @@ # # Copyright (C) 2012 Karel Zak <kzak@redhat.com> # +# Usage: ko-release-push [<directory> [<version>]] +# # This script pushs files from <directory>/v<version> to kernel.org. The -# default directory is kernel.org and <version> is the current package version. +# default <directory> is "kernel.org" and the default <version> is the current +# package version. # # The <directory>/v<version> files should be generated by ko-release-gen script. # @@ -16,7 +19,7 @@ cd "$(git rev-parse --show-toplevel)" || { [ -f ".version" ] || \ echo "error: cannot found version file (call make distcheck)" -VERSION=$(cat .version) +VERSION=${2:-$(cat .version)} VERSION_MAJOR=$(echo $VERSION | sed 's/-rc[0-9]//') BASEDIR=${1:-"kernel.org"} DISTDIR="${BASEDIR}/v${VERSION_MAJOR}" @@ -33,14 +36,19 @@ function push_file { case "$sig" in *.tar.sign) - fl=$(echo "$sig" | sed 's/\.tar\.sign/.tar.xz/') + fl=${sig%%.sign} + if [ -f ${fl}.xz ]; then fl=${fl}.xz + elif [ -f ${fl}.gz ]; then fl=${fl}.gz + elif [ -f ${fl}.bz2 ]; then fl=${fl}.bz2 + else die "cannot found original file for $sig" + fi ;; *) fl=$(echo "$sig" | sed 's/\.sign//') ;; esac - echo -n " PUSH $sig ..." + echo -n " PUSH $fl ..." kup put $fl $sig ${KO_DIR}/${fl##${DISTDIR}/} echo " OK " } |