From b241ebf80d1212e478605fa5a8b5a83ce372325f Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 16 Feb 2017 16:46:04 +0100 Subject: [PATCH] deployiso: minor tweaks; don't make torrent_meta input option --- README.md | 3 --- data/manjaro-tools.conf | 5 +---- docbook/manjaro-tools.conf.xml | 7 ------- lib/util.sh | 13 +++++++++---- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index c498275..6d27b77 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,6 @@ overriding # Piece size, 2^n # piece_size=21 -# torrent meta comment -# torrent_meta="ManjaroLinux" - # iso mirrors # iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') ~~~ diff --git a/data/manjaro-tools.conf b/data/manjaro-tools.conf index bcd33c6..5640758 100644 --- a/data/manjaro-tools.conf +++ b/data/manjaro-tools.conf @@ -68,7 +68,7 @@ # account=[SetUser] # the server project -# project="manjarolinux" +# project="[SetProject]" # set upload bandwidth limit in kB/s # limit=100 @@ -79,8 +79,5 @@ # Piece size, 2^n # piece_size=21 -# torrent meta comment -# torrent_meta="ManjaroLinux" - # iso mirrors # iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') diff --git a/docbook/manjaro-tools.conf.xml b/docbook/manjaro-tools.conf.xml index b9defe8..a677424 100644 --- a/docbook/manjaro-tools.conf.xml +++ b/docbook/manjaro-tools.conf.xml @@ -252,13 +252,6 @@ along with systemd; If not, see . - - torrent_meta= - - Default meta comment for the torrent. - - - limit= diff --git a/lib/util.sh b/lib/util.sh index a3020b5..fd0c7fe 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -264,6 +264,11 @@ get_distname(){ echo "${DISTRIB_ID%Linux}" } +get_distid(){ + source /etc/lsb-release + echo "${DISTRIB_ID}" +} + get_disturl(){ source /etc/os-release echo "${HOME_URL}" @@ -321,7 +326,7 @@ init_deployiso(){ host="sourceforge.net" - [[ -z ${project} ]] && project="manjarolinux" + [[ -z ${project} ]] && project="[SetProject]" [[ -z ${account} ]] && account="[SetUser]" @@ -333,7 +338,7 @@ init_deployiso(){ [[ -z ${iso_mirrors[@]} ]] && iso_mirrors=('heanet' 'jaist' 'netcologne' 'iweb' 'kent') - [[ -z ${torrent_meta} ]] && torrent_meta="ManjaroLinux" + torrent_meta="$(get_distid)" } load_config(){ @@ -735,9 +740,9 @@ show_version(){ show_config(){ if [[ -f ${USERCONFDIR}/manjaro-tools.conf ]]; then - msg2 "user_config: %s" "${USERCONFDIR}/manjaro-tools.conf" + msg2 "config: %s" "~/.config/manjaro-tools/manjaro-tools.conf" else - msg2 "manjaro_tools_conf: %s" "${manjaro_tools_conf}" + msg2 "config: %s" "${manjaro_tools_conf}" fi }