diff options
author | Simon Rettberg | 2013-02-27 19:05:39 +0100 |
---|---|---|
committer | Simon Rettberg | 2013-02-27 19:05:39 +0100 |
commit | 5745a8d824857b90bd5e25478226570d8e805c95 (patch) | |
tree | c85bd56286c768cffc7cc2e8dd04f17c298352e2 /mltk | |
parent | Merge branch 'master' of ssh://openslx/openslx-ng/tm-scripts (diff) | |
download | tm-scripts-5745a8d824857b90bd5e25478226570d8e805c95.tar.gz tm-scripts-5745a8d824857b90bd5e25478226570d8e805c95.tar.xz tm-scripts-5745a8d824857b90bd5e25478226570d8e805c95.zip |
Add build profiles to target 'tools' (-p switch)
Diffstat (limited to 'mltk')
-rwxr-xr-x | mltk | 31 |
1 files changed, 22 insertions, 9 deletions
@@ -45,25 +45,28 @@ banner () { print_usage() { echo "Toolkit for creating preboot mini-linux for OpenSLX NG (mltk)" - echo "Usage: $(basename ${SELF}) [target] [-b] [-c] [-d] [module]*" + echo "Usage: $(basename ${SELF}) tools [-d] [-c [module]*] [-b [module]*] [-p profile]" + echo " $(basename ${SELF}) core [-d] [-c] [-b]" echo -e "" echo -e " Target:" echo -e " core \t minimal initramfs (stage 3.1) to mount the system-container (stage 3.2)." echo -e " tools \t minimal systemd-based rootfs including basic tools (required for core)." echo -e "" echo -e " Target options:" - echo -e " -b \t build current target" - echo -e " -c \t clean current target" - echo -e " -d \t activates debug output for current target" + echo -e " -b build target" + echo -e " -c clean target" + echo -e " -d activates debug output for current target" + echo -e " -p profile build all modules from given profile" echo -e "" - echo -e " For target tools, you can pass names of specific modules to clean/build." + echo -e " For target 'tools', you can pass names of specific modules to clean/build." echo -e " Otherwise, all modules will be built/cleaned." echo -e "" echo -e " Examples:" - echo -e " tools -c -b base policykit sshd (clean all tools, build base, policykit and sshd)" - echo -e " tools -c -b (clean all tools, build all tools)" - echo -e " tools -c base sshd -b sshd ldm -d (clean base and sshd, build sshd and ldm, be verbose)" - echo -e " core -c -b (clean and build core)" + echo -e " tools -c -b base policykit sshd (clean all tools, build base, policykit and sshd)" + echo -e " tools -c -b (clean all tools, build all tools)" + echo -e " tools -c base sshd -b sshd ldm -d (clean base and sshd, build sshd and ldm, be verbose)" + echo -e " tools -c -p default (clean all tools, build modules listed in profile default)" + echo -e " core -c -b (clean and build core)" echo -e "" echo -e " Existing modules for tools are:" echo -e " $(echo $(ls ${ROOT_DIR}/remote/tools))" @@ -121,6 +124,16 @@ read_params() { eval ${MODE}_DEBUG="1" continue ;; + -p) + [ "$#" -lt "1" ] && perror "Missing argument to -p" + [ "$MODE" != "TOOLS" ] && perror "-p can only be used for target tools" + . "profiles/${1}.profile" || perror "Profile '$1' not found in profiles/" + TOOLS_BUILD="1" + TOOLS_LIST_BUILD="$TOOLS_LIST_BUILD $MODULES" + unset MODULES + shift + continue + ;; *) pwarning "Unknown flag to target: $PARAM" print_usage |