From 3952fdb4a83ccff4f46cd9cde341f0c79874a01a Mon Sep 17 00:00:00 2001 From: Roman Alekseenkov Date: Wed, 10 Oct 2012 14:43:36 -0700 Subject: [PATCH] fixed publish script not to fail when there are no packages --- publish-package.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/publish-package.sh b/publish-package.sh index 02b14cbec2..a83651ed39 100755 --- a/publish-package.sh +++ b/publish-package.sh @@ -1,22 +1,30 @@ #!/bin/bash -set -e if [ ! $# == 1 ]; then echo "Usage: $0 " - echo "Available archives for publishing:" - for line in `ls fuel-*.tar.gz`; do echo " * $line (run \"$0 $line\")"; done + + lines=`ls fuel-*.tar.gz 2> /dev/null` + if [[ ! $lines ]]; then + echo "No archives available for publishing" + else + echo "Available archives for publishing:" + for line in $lines; do echo " * $line (run \"$0 $line\")"; done + fi + exit fi package_file="$1" -if [ ! -f $package_file ]; -then +if [ ! -f $package_file ]; then echo "File $package_file not found!" exit fi +# +# publish package to http://download.mirantis.com/fuel-releases/ +# rsync -v $package_file rsync://repo.srt.mirantis.net:/repo/fuel-releases/$package_file