From 2e61e503974571153cd81e662abda5892b8b39e0 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 30 Jan 2014 10:40:11 +0100 Subject: allow to change default export path; on remote via mltk -n name; on server via export REMOTE_EXPORT_DIR=/export/name --- mltk | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'mltk') diff --git a/mltk b/mltk index 95b924d5..4810de06 100755 --- a/mltk +++ b/mltk @@ -65,14 +65,16 @@ print_usage() { echo -e "" echo -e "Toolkit for creating preboot mini-linux for OpenSLX NG (mltk)" #echo -e "Usage: $(basename ${SELF}) [-d] [-c [module]*] [-b [module]*] [-p profile]" - echo -e "Usage: $ARG0 [-d] [-c [module]*] [-b [module]*] [-n]" + echo -e "Usage: $ARG0 [-d] [-c [module]*] [-b [module]*] [-n [name]]" echo -e "" echo -e " Options:" echo -e " -d activates debug output for the task (spamy)" echo -e " -b build module(s) and copy them to the target build directory" echo -e " -c clean build directory of module(s) and target dir" #echo -e " -p profile build all modules from given profile (DEPRECATED?)" - echo -e " -n bind mount all the local builds (remote/builds) to /export/builds" + echo -e " -n bind mount all the local builds (remote/builds) to /export/builds;" + echo -e " the optional parameter name allows to change the default mount target" + echo -e " -> /export/" echo -e "" echo -e " You can pass names of specific modules to clean/build (-c / -b)." echo -e " Otherwise, all modules will be cleaned/built." @@ -218,7 +220,12 @@ read_params() { continue ;; -n) - [ "x" != "x$1" ] && perror "'-n' accepts no parameters. Given: $1" + if [ -z "$1" ]; then + REMOTE_EXPORT_DIR=/export/build + else + REMOTE_EXPORT_DIR="/export/$1" + shift + fi REMOTE_EXPORT="1" continue ;; -- cgit v1.2.3-55-g7522