diff --git a/.gitignore b/.gitignore index e4385c1fc6..6d56cd38a6 100644 --- a/.gitignore +++ b/.gitignore @@ -265,3 +265,6 @@ lerna-debug.log # Cached/auto-compiled Python bytecode *.pyc + +# Debian watch file - we generate it from watch.in +watch diff --git a/common/core/desktop/debian/watch b/common/core/desktop/debian/watch deleted file mode 100644 index c42082f867..0000000000 --- a/common/core/desktop/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/keyman-keyboardprocessor-(.+)\.tar\.gz debian uupdate diff --git a/linux/ibus-keyman/debian/watch b/linux/ibus-keyman/debian/watch deleted file mode 100644 index be5c209148..0000000000 --- a/linux/ibus-keyman/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/ibus-keyman-(.+)\.tar\.gz debian uupdate diff --git a/linux/ibus-kmfl/debian/watch b/linux/ibus-kmfl/debian/watch deleted file mode 100644 index 21e24d1d8e..0000000000 --- a/linux/ibus-kmfl/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/ibus-kmfl-(.+)\.tar\.gz debian uupdate diff --git a/linux/keyman-config/debian/watch b/linux/keyman-config/debian/watch deleted file mode 100644 index 1fc7f076e7..0000000000 --- a/linux/keyman-config/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/keyman_config-(.+)\.tar\.gz debian uupdate diff --git a/linux/kmflcomp/debian/watch b/linux/kmflcomp/debian/watch deleted file mode 100644 index f46fe83a11..0000000000 --- a/linux/kmflcomp/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/kmflcomp-(.+)\.tar\.gz debian uupdate diff --git a/linux/libkmfl/debian/watch b/linux/libkmfl/debian/watch deleted file mode 100644 index 32bdd4fc32..0000000000 --- a/linux/libkmfl/debian/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=4 -# Tier set by launchpad.sh script -https://downloads.keyman.com/linux/$tier/(\d\S+)/libkmfl-(.+)\.tar\.gz debian uupdate diff --git a/linux/scripts/launchpad.sh b/linux/scripts/launchpad.sh index a8b96927ab..37db835852 100755 --- a/linux/scripts/launchpad.sh +++ b/linux/scripts/launchpad.sh @@ -37,7 +37,7 @@ else fi echo "ppa: ${ppa}" -if [ ! `which xmllint` ]; then +if [ ! $(which xmllint) ]; then echo "you must install xmllint (libxml2-utils package) to use this script" exit 1 fi @@ -61,7 +61,7 @@ else fi -BASEDIR=`pwd` +BASEDIR=$(pwd) rm -rf launchpad mkdir -p launchpad @@ -72,30 +72,28 @@ for proj in ${projects}; do else cd ${proj} fi + if [ "${proj}" == "keyman-config" ]; then - tarname="keyman_config" make clean - else - tarname="${proj}" fi # Update tier in Debian watch files (replacing any previously set tier) - sed -i "s/\$tier\|alpha\|beta\|stable/${TIER}/g" debian/watch + sed "s/\$tier\|alpha\|beta\|stable/${TIER}/g" $BASEDIR/scripts/watch.in > debian/watch - version=`uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -` - dirversion=`uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6` + version=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-version/text()" -) + dirversion=$(uscan --report --dehs|xmllint --xpath "//dehs/upstream-url/text()" - | cut -d/ -f6) echo "${proj} version is ${version}" uscan cd .. mv ${proj}-${version} ${BASEDIR}/launchpad mv ${proj}_${version}.orig.tar.gz ${BASEDIR}/launchpad - mv ${tarname}-${version}.tar.gz ${BASEDIR}/launchpad + mv ${proj}-${version}.tar.gz ${BASEDIR}/launchpad rm ${proj}*.debian.tar.xz cd ${BASEDIR}/launchpad wget -N https://downloads.keyman.com/linux/${TIER}/${dirversion}/SHA256SUMS - sha256sum -c --ignore-missing SHA256SUMS |grep ${tarname} + sha256sum -c --ignore-missing SHA256SUMS |grep ${proj} cd ${proj}-${version} - echo `pwd` + echo $(pwd) cp debian/changelog ../${proj}-changelog #TODO separate source builds and dputs for each of $dists? for dist in ${distributions}; do diff --git a/linux/scripts/watch.in b/linux/scripts/watch.in new file mode 100644 index 0000000000..671684f430 --- /dev/null +++ b/linux/scripts/watch.in @@ -0,0 +1,3 @@ +version=4 +# Tier set by launchpad.sh script +https://downloads.keyman.com/linux/$tier/@ANY_VERSION@/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate