From: Michael Prokop Date: Mon, 23 Jul 2018 06:55:34 +0000 (+0200) Subject: Drop cmdlineopts.sh references from build system X-Git-Tag: v0.83~11 X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=commitdiff_plain;h=a8eeda3e2d78607046e63866197995fc5ea4bd14 Drop cmdlineopts.sh references from build system Also drop tests/test_cmdlineopts.sh, it reports success even though it can't even source the fileā€¦ --- diff --git a/Makefile b/Makefile index 1a2aa02..235c916 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,6 @@ install: install -m 755 chroot-script $(DESTDIR)/etc/debootstrap/ install -m 755 grml-debootstrap $(DESTDIR)/usr/sbin/ install -m 644 zsh-completion $(DESTDIR)/etc/zsh/completion.d/_grml-debootstrap - install -m 644 cmdlineopts.clp $(DESTDIR)/usr/share/grml-debootstrap/functions/cmdlineopts.clp clean: rm -rf grml-debootstrap.8.html grml-debootstrap.8.xml grml-debootstrap.8 html-stamp man-stamp packer/local_dir/ diff --git a/tests/test_cmdlineopts.sh b/tests/test_cmdlineopts.sh deleted file mode 100755 index c1df0d6..0000000 --- a/tests/test_cmdlineopts.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - - -test_cmdlineopts() { - . ../cmdlineopts.clp - CMDLINE= - typeset -a VALUES - count=0 - i=0 - - OLDIFS="$IFS" - IFS=, - for CMD in $CMDLINE_OPTS ; do - PARAM="" - DELIM=" " - # check if CMD is optional - if [[ $CMD == *:: ]] ; then - DELIM="=" - fi - # CMD expects additional parameter - if [[ $CMD == *: ]] ; then - PARAM=$RANDOM - fi - VALUES[$count]="${CMD%%:*}$DELIM$PARAM" - ((count++)) - done - IFS=$OLDIFS - - # build the commandline - while [ "$i" -lt "$count" ] ; do - CMDLINE+="--${VALUES[$i]} " - ((i++)) - done - - . ../cmdlineopts.clp $CMDLINE - - - i=0 - # check the result against input - while [ "$i" -lt "$count" ] ; do - ENTRY="${VALUES[$i]}" - VARNAME=${ENTRY% *} - VARNAME=${VARNAME%=*} - RESULT=${ENTRY/* /} - RESULT=${RESULT/*=/} - VARNAME='$_opt_'${VARNAME/-/_} - VALUE="$(eval echo $VARNAME)" - if [ -z "$RESULT" ] ; then - assertNotNull "$VARNAME should be not null" "$VALUE" - else - assertEquals "$VARNAME" "$RESULT" "$VALUE" - fi - ((i++)) - done -} - -SHUNIT_PARENT=$0 -. /usr/share/shunit2/shunit2