Skip to content

Commit

Permalink
Added asciinema 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
icaoberg committed Nov 11, 2022
1 parent 99c0014 commit 3c61c3d
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
14 changes: 14 additions & 0 deletions 2.2.0/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Bootstrap: docker
From: alpine:edge

%labels
MAINTAINER icaoberg
EMAIL [email protected]
SUPPORT [email protected]
REPOSITORY https://github.com/pscedu/singularity-asciinema
COPYRIGHT Copyright © 2021-2022 Pittsburgh Supercomputing Center. All Rights Reserved.
VERSION 2.2.0

%post
apk update
apk add asciinema
18 changes: 18 additions & 0 deletions 2.2.0/asciinema
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

VERSION=2.2.0
PACKAGE=asciinema
TOOL=$PACKAGE
DIRECTORY=$(dirname $0)

STORAGES=(/ocean /bil /hive /local)

OPTIONS=""
for STORAGE in "${STORAGES[@]}"
do
if [ -d "$STORAGE" ]; then
OPTIONS=$OPTIONS" -B $STORAGE"
fi
done

singularity exec $OPTIONS $DIRECTORY/singularity-$PACKAGE-$VERSION.sif $TOOL "$@"
19 changes: 19 additions & 0 deletions 2.2.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Copyright © 2021-2022 Pittsburgh Supercomputing Center.
# All Rights Reserved.

IMAGE=singularity-asciinema-2.2.0.sif
DEFINITION=Singularity

if [ -f $IMAGE ]; then
rm -fv $IMAGE
fi

sudo singularity build $IMAGE $DEFINITION

if [ -f $IMAGE ]; then
exit 0
else
exit 1
fi
41 changes: 41 additions & 0 deletions 2.2.0/modulefile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--
-- asciinema 2.2.0 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Other"
-- "Description: asciinema is a free and open source solution for recording terminal sessions and sharing them on the web."
-- "Keywords: singularity utilities"

whatis("Name: asciinema")
whatis("Version: 2.2.0")
whatis("Category: Other")
whatis("URL: https://www.psc.edu/resources/software")
whatis("Description: asciinema is a free and open source solution for recording terminal sessions and sharing them on the web.")

help([[
Description
-----------
asciinema is a free and open source solution for recording terminal sessions and sharing them on the web.
To load the module type
> module load asciinema/2.2.0
To unload the module type
> module unload asciinema/2.2.0
Documentation
-------------
For help, type
> asciinema --help
Tools included in this module are
* asciinema
]])

local package = "asciinema"
local version = "2.2.0"
local base = pathJoin("/opt/packages",package,version)
prepend_path("PATH", base)
19 changes: 19 additions & 0 deletions 2.2.0/rbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Copyright © 2021-2022 Pittsburgh Supercomputing Center.
# All Rights Reserved.

IMAGE=singularity-asciinema-2.2.0.sif
DEFINITION=Singularity

if [ -f $IMAGE ]; then
rm -fv $IMAGE
fi

singularity build --remote $IMAGE $DEFINITION

if [ -f $IMAGE ]; then
exit 0
else
exit 1
fi
5 changes: 5 additions & 0 deletions 2.2.0/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

tree .

singularity exec singularity-asciinema-2.2.0.sif asciinema --help

0 comments on commit 3c61c3d

Please sign in to comment.