From 4f74f8c9e12711c37695d60f890edd669d537209 Mon Sep 17 00:00:00 2001 From: Bernhard Landauer Date: Sat, 14 Apr 2018 12:26:49 +0200 Subject: [PATCH] [deployiso] osdn project based on profile --- bin/deployiso.in | 2 +- lib/util-publish.sh | 1 + lib/util.sh | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/deployiso.in b/bin/deployiso.in index ba8d924..250f070 100644 --- a/bin/deployiso.in +++ b/bin/deployiso.in @@ -22,6 +22,7 @@ import ${LIBDIR}/util-publish.sh show_profile(){ prepare_transfer "$1" info "Profile: [$1]" + msg2 "project: %s" "${project}" msg2 "src_dir: ${src_dir}" msg2 "target_dir: ${url}/${target_dir}/" } @@ -54,7 +55,6 @@ display_settings(){ msg "REMOTE:" msg2 "account: %s" "${account}" msg2 "host: %s" "${host}" - msg2 "project: %s" "${project}" msg "UPLOAD QUEUE:" run show_profile "${build_list_iso}" diff --git a/lib/util-publish.sh b/lib/util-publish.sh index 44d3d9a..54f2e29 100644 --- a/lib/util-publish.sh +++ b/lib/util-publish.sh @@ -39,6 +39,7 @@ make_torrent(){ prepare_transfer(){ profile="$1" edition=$(get_edition "${profile}") + [[ -z ${project} ]] && project="$(get_project)" url=$(connect) target_dir="${profile}/${dist_release}" diff --git a/lib/util.sh b/lib/util.sh index dbce7c3..0edd1c2 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -324,8 +324,6 @@ init_deployiso(){ host="osdn.net" - [[ -z ${project} ]] && project="[SetProject]" - [[ -z ${account} ]] && account="[SetUser]" [[ -z ${limit} ]] && limit=100 @@ -435,6 +433,18 @@ get_edition(){ echo ${path##*/} } +get_project(){ + case "${edition}" in + 'manjaro') + project="manjaro" + ;; + 'community') + project="manjaro-community" + ;; + esac + echo "${project}" +} + reset_profile(){ unset displaymanager unset autologin