2010-07-31 14:10:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-04-22 16:20:41 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
2010-07-31 14:10:57 +00:00
|
|
|
|
|
|
|
version=$1
|
|
|
|
if [ -z "${version}" ]; then
|
|
|
|
echo "usage: update <version>"
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-04-26 10:46:20 +00:00
|
|
|
set -eux
|
|
|
|
url="http://ftpmirror.gnu.org/parallel/parallel-${version}.tar.bz2"
|
2010-07-31 14:10:57 +00:00
|
|
|
file="/tmp/parallel-${version}.tgz"
|
|
|
|
wget "$url" -O "${file}"
|
2013-04-26 10:46:20 +00:00
|
|
|
wget "$url.sig" -O "${file}.sig"
|
|
|
|
|
|
|
|
# verify published signature comes from expected GPG key
|
|
|
|
gpg -n --verify "${file}.sig" "${file}" 2>&1 | tee "${file}.gpglog"
|
|
|
|
set +x
|
|
|
|
KEYID="$(grep '^Primary key fingerprint:' "${file}.gpglog" | tr -d ' ' | cut -f 2 -d : )"
|
2013-08-26 10:54:35 +00:00
|
|
|
fingerprint="CDA01A4208C4F74506107E7BD1AB451688888888"
|
2013-04-26 10:46:20 +00:00
|
|
|
if [ "$KEYID" != "$fingerprint" ]; then
|
|
|
|
echo "Signature verification FAILED:"
|
|
|
|
cat "${file}.gpglog"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
2010-07-31 14:10:57 +00:00
|
|
|
( cd "$(dirname "$0")" && \
|
2013-04-26 10:46:20 +00:00
|
|
|
0install run http://0install.net/2006/interfaces/0publish \
|
2010-07-31 14:10:57 +00:00
|
|
|
--add-version ${version} \
|
|
|
|
--archive-url="${url}" \
|
|
|
|
--archive-file="${file}" \
|
|
|
|
--archive-extract="parallel-${version}" \
|
|
|
|
--set-released=today \
|
2010-11-13 23:32:21 +00:00
|
|
|
--xmlsign parallel.xml ) && \
|
|
|
|
git commit -am "0install: added version $version" -e
|