From 757787725cffc24f6c4e353fefa63bf255007457 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 24 Feb 2019 15:44:35 +0200 Subject: Updates for 0.9.0 release --- publish | 90 ----------------------------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100755 publish (limited to 'publish') diff --git a/publish b/publish deleted file mode 100755 index e9f658f..0000000 --- a/publish +++ /dev/null @@ -1,90 +0,0 @@ -#! /usr/bin/env bash - -# Publish build2 to build2.org/cppget.org (and brep.cppget.org). -# -# The distribution is taken from cppget.org/0/ and packages from -# cppget.org/repository/. -# -# -d -# Only publish the distribution. -# -# -p -# Only publish the packages. -# -usage="$0 [options] -- []" - -owd=`pwd` -trap "{ cd $owd; exit 1; }" ERR -set -o errtrace # Trap in functions. - -function info () { echo "$*" 1>&2; } -function error () { info "$*"; exit 1; } - -pkg_only= -dist_only= - -while [ $# -gt 0 ]; do - case $1 in - -d) - dist_only=true - shift - ;; - -p) - pkg_only=true - shift - ;; - --) - shift - break - ;; - *) - error "unexpected $1" - ;; - esac -done - -if [ -z "$pkg_only" ]; then - v="$(sed -n -re 's/^version: ([^.]+\.[^.]+\.[^-]+(-[ab]\.[^.+]+)?).*$/\1/p' build2-toolchain/manifest)" - - if [ -z "$v" ]; then - error "unable to extract version build2-toolchain/manifest" - fi -fi - - -function sync () -{ - if [ -z "$pkg_only" ]; then - info "build2.org:" - - rsync -v -rlpt -c --copy-unsafe-links --prune-empty-dirs --delete-after \ -"${@}" "cppget.org/0/$v/" "build2.org:/var/www/download.build2.org/public/$v/" - - rsync -v -rlpt -c --copy-unsafe-links --prune-empty-dirs --delete-after \ -"${@}" "cppget.org/0/toolchain.sha256" "build2.org:/var/www/download.build2.org/public/" - fi - - if [ -z "$dist_only" ]; then - info "cppget.org:" - etc/rep-publish cppget.org/repository/1/ cppget.org:/var/bpkg/1/ "${@}" - - info "brep.cppget.org:" - etc/rep-publish cppget.org/repository/1/ lists.cppget.org:/var/bpkg/1/ \ -"${@}" - fi -} - -sync --dry-run "${@}" - -r= -while [ -z "$r" ]; do - read -r -p "Continue? [yes/no]: " r - - case "$r" in - yes) ;; - no) exit 0 ;; - *) r= ;; - esac -done - -sync --progress "${@}" -- cgit v1.1