diff options
| author | Bryton Hall <email@bryton.io> | 2019-01-03 18:39:56 -0500 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2019-11-27 07:08:09 +0100 |
| commit | ac037db8115485ee9f17a848e496c98bcc58cf0e (patch) | |
| tree | 658cc22d6faafd9d081ca7d86d5ab2f1c5843c51 /tests/examplefiles | |
| parent | b45777fd2713bc3c6b80680168563afa5c96b46d (diff) | |
| download | pygments-git-793/brytonhall/singularity.tar.gz | |
add Singularity lexer793/brytonhall/singularity
Diffstat (limited to 'tests/examplefiles')
| -rw-r--r-- | tests/examplefiles/Singularity | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/examplefiles/Singularity b/tests/examplefiles/Singularity new file mode 100644 index 00000000..0056e008 --- /dev/null +++ b/tests/examplefiles/Singularity @@ -0,0 +1,45 @@ +BoOtStRaP: library # pass: headers are case-insensitive +# pass: do not highlight '%' +MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/ + From: ubuntu:18.04 # pass: leading whitespace allowed + +%setup + touch /file1 +touch ${SINGULARITY_ROOTFS}/file2 # pass: leading whitespace optional + +%files + /file1 + /file1 /opt + +%environment + export LISTEN_PORT=12345 + export LC_ALL=C + +%runscript + echo "Container was created $NOW" + echo "Arguments received: $*" + exec echo "$@" + +%startscript + nc -lp $LISTEN_PORT + +%test + grep -q NAME=\"Ubuntu\" /etc/os-release + if [ $? -eq 0 ]; then + echo "Container base is Ubuntu as expected." + else + echo "Container base is not Ubuntu." + fi + +%labels + Author d@sylabs.io + Version v0.0.1 + +%help + This is a demo container used to illustrate a def file that uses all + supported sections. + +%post + apt-get update && apt-get install -y netcat + NOW=$((date % 1)) # pass: don't highlight '%' + echo "export NOW=\"${NOW}\"" >> $SINGULARITY_ENVIRONMENT |
