Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / listfull.sh
index b02edda..697cab8 100755 (executable)
@@ -1,24 +1,31 @@
 #!/bin/sh
-list=""
-for x in ../lib/*
-do
-       bx=`basename $x`
-       y="$x/$bx.nit"
-       test -f $y && list="$list $y"
-done
-printf "%s\n" "$@" *.nit \
+for module in "$@" \
+       ../src/nit*.nit \
+       ../src/test_*.nit \
+       ../src/examples/*.nit \
        ../examples/*.nit \
        ../examples/*/*.nit \
        ../examples/shoot/src/shoot_logic.nit \
        ../examples/*/src/*_android.nit \
        ../examples/*/src/*_linux.nit \
        ../examples/*/src/*_null.nit \
-       ../examples/pnacl/converter/converter.nit \
-       ../examples/nitcorn/src/*.nit \
-       ../examples/mpi/src/*.nit \
-       ../lib/*.nit $list \
-       ../src/nit*.nit \
-       ../src/test_*.nit \
-       ../contrib/*.nit \
-       ../contrib/*/*.nit \
-       ../contrib/*/src/*.nit
+       ../lib/*/examples/*.nit \
+       ../lib/*/examples/*/*.nit \
+       ../contrib/friendz/src/solver_cmd.nit \
+       ../contrib/neo_doxygen/src/tests/neo_doxygen_*.nit \
+       ../contrib/pep8analysis/src/pep8analysis.nit \
+       ../contrib/nitin/nitin.nit \
+       ../contrib/nitiwiki/src/nitiwiki.nit \
+       *.nit \
+; do
+       case "${module}" in
+               ../lib/popcorn/examples/*)
+                       continue
+                       ;;
+               *)
+                       # See [Rich’s sh (POSIX shell) tricks](http://www.etalabs.net/sh_tricks.html),
+                       # section “Shell-quoting arbitrary strings”.
+                       printf '%s\n' "${module}" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/'/"
+                       ;;
+       esac
+done