Drop cmdlineopts.sh references from build system
authorMichael Prokop <mika@grml.org>
Mon, 23 Jul 2018 06:55:34 +0000 (08:55 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 23 Jul 2018 07:25:25 +0000 (09:25 +0200)
Also drop tests/test_cmdlineopts.sh, it reports
success even though it can't even source the fileā€¦

Makefile
tests/test_cmdlineopts.sh [deleted file]

index 1a2aa02..235c916 100644 (file)
--- 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 (executable)
index c1df0d6..0000000
+++ /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