Skip to content

Commit

Permalink
Added version 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
icaoberg committed Oct 24, 2024
1 parent 1ce0973 commit 196ef42
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 0 deletions.
23 changes: 23 additions & 0 deletions 2.5/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Bootstrap: docker
From: debian:latest

%labels
MAINTAINER icaoberg
EMAIL [email protected]
SUPPORT [email protected]
REPOSITORY http://gitub.com/pscedu/singularity-ncdu
COPYRIGHT Copyright © 2021-2024 Pittsburgh Supercomputing Center. All Rights Reserved.
VERSION 2.5

%post
apt update
apt install -y wget
wget -nc https://dev.yorhel.nl/download/ncdu-2.5-linux-x86.tar.gz
tar -xvf ncdu-2.5-linux-x86.tar.gz
rm -f ncdu-2.5-linux-x86.tar.gz
mv ncdu /usr/local/bin
apt remove -y wget
apt -y autoremove

%runscript
ncdu "$@"
19 changes: 19 additions & 0 deletions 2.5/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

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

IMAGE=singularity-ncdu-2.5.sif
DEFINITION=Singularity

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

singularity build $IMAGE $DEFINITION

if [ -f $IMAGE ]; then
exit 0
else
exit 1
fi
39 changes: 39 additions & 0 deletions 2.5/modulefile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--
-- ncdu 2.5 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Other"
-- "Description: ncdu is a disk usage analyzer with an ncurses interface."
-- "Keywords: singularity utilities"

whatis("Name: ncdu")
whatis("Version: 2.5")
whatis("Category: Other")
whatis("Description: ncdu is a disk usage analyzer with an ncurses interface.")

help([[
ncdu is a disk usage analyzer with an ncurses interface.
To load the module, type
> module load ncdu/2.5
To unload the module, type
> module unload ncdu/2.5
Documentation
-------------
For help, type
> ncdu --help
Tools included in this module are
* ncdu
]])

local package = "ncdu"
local version = "2.5"
local base = pathJoin("/opt/packages",package,version)
prepend_path("PATH", base)
16 changes: 16 additions & 0 deletions 2.5/ncdu
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

VERSION=2.5
PACKAGE=ncdu
TOOL=$PACKAGE
DIRECTORY=$(dirname $0)

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.5/rbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

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

IMAGE=singularity-ncdu-2.5.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
7 changes: 7 additions & 0 deletions 2.5/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo "Listing files"
tree .

echo "Testing bat"
singularity exec singularity-ncdu-2.5.sif ncdu --help

0 comments on commit 196ef42

Please sign in to comment.