allow executing single test via nix run .#tests-examples {package}

This commit is contained in:
DavHau 2022-04-15 01:15:37 +02:00
parent e9b336953a
commit 1ac93e4d93

View File

@ -18,7 +18,13 @@ in
nix
]
''
for dir in $(ls ${examples}); do
if [ -n "$1" ]; then
examples=$1
else
examples=$(ls ${examples})
fi
for dir in $examples; do
echo -e "\ntesting example for $dir"
mkdir tmp
cp ${examples}/$dir/* ./tmp/