diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-06-12 12:40:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-06-12 12:57:35 +0000 |
commit | 4327c5789ccbc186fe59e50e13f29a41c4b0e4ea (patch) | |
tree | 45a0bfcec8e31f9f40b774f0f0c153688ca8b0eb /bin | |
parent | Updating. (diff) | |
download | progress-linux-tools-4327c5789ccbc186fe59e50e13f29a41c4b0e4ea.tar.xz progress-linux-tools-4327c5789ccbc186fe59e50e13f29a41c4b0e4ea.zip |
Updating.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pbuild.sh | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/bin/pbuild.sh b/bin/pbuild.sh index 2b47dec..7f88118 100755 --- a/bin/pbuild.sh +++ b/bin/pbuild.sh @@ -43,8 +43,8 @@ esac Parameters() { - LONG_OPTIONS="auto,build:,distribution:,interactive,nocheck,package:,tag:,upload," - OPTIONS="a,b:,d:,i,n,p:,t:,u," + LONG_OPTIONS="auto,build:,distribution:,interactive,nocheck,only-missing-builds,package:,tag:,upload," + OPTIONS="a,b:,d:,i,n,o,p:,t:,u," PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${PROGRAM} --options ${OPTIONS} --shell sh -- ${@})" @@ -89,6 +89,11 @@ Parameters() shift 2 ;; + -o|--only-missing-builds) + ONLY_MISSING_BUILDS="true" + shift 1 + ;; + -t|--tag) TAG="${2}" shift 2 @@ -116,7 +121,7 @@ Parameters "${@}" if [ -z "${DISTRIBUTION}" ] || [ -z "${PACKAGE}" ] then - echo "Usage: ${PROGRAM} [-b|--build BUILD] -d|--distribution DISTRIBUTION -p|--package PACKAGE -t|--tag TAG[,TAG,...]" >&2 + echo "Usage: ${PROGRAM} -a|--auto [-b|--build BUILD] -d|--distribution DISTRIBUTION -n|--nocheck -p|--package PACKAGE -o|--only-missing-builds -t|--tag ALL|TAG[,TAG,...] -u|--upload" >&2 exit 1 fi @@ -130,6 +135,12 @@ fi TAGS="$(echo ${TAG} | sed -e 's|,| |g')" +case "${TAGS}" in + ALL) + TAGS="$(wget -q https://git.progress-linux.org/packages/${DISTRIBUTION}/${PACKAGE}/refs/ -O - | grep "<tr><td><a href='/packages/${DISTRIBUTION}/${PACKAGE}/tag/?h=progress-linux/" | awk -F\> '{ print $4 }' | sed -e 's|<.*||' | sort -V)" + ;; +esac + if [ -z "${BUILD}" ] then case "$(dpkg --print-architecture)" in @@ -179,6 +190,26 @@ do echo "Building ${BUILD} ($(dpkg --print-architecture)) package: ${PACKAGE} ${VERSION}" echo "################################################################################" + case "${ONLY_MISSING_BUILDS}" in + true) + case "${BUILD}" in + source) + URL="https://apt.progress-linux.org/archive/${DISTRIBUTION}/${PACKAGE}/${VERSION}_source" + ;; + + *) + URL="https://apt.progress-linux.org/archive/${DISTRIBUTION}/${PACKAGE}/${VERSION}_$(dpkg --print-architecture)" + ;; + esac + + if wget -q ${URL} -O /dev/null + then + echo "### skipping build, it's already present." + continue + fi + ;; + esac + case "${BUILD}" in source) if [ -n "${TAG}" ] |