Skip to content

Commit

Permalink
Added version 2.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Cao-Berg committed Feb 20, 2023
1 parent e26d89d commit 910f01d
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 2.2.2/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Bootstrap: docker
From: debian:latest

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

%post
apt update
apt install -y wget
wget -nc https://dev.yorhel.nl/download/ncdu-2.2.1-linux-x86_64.tar.gz
tar -xvf ncdu-2.2.1-linux-x86_64.tar.gz
rm -f ncdu-2.2.1-linux-x86_64.tar.gz
mv ncdu /usr/local/bin
apt remove -y wget
apt -y autoremove
19 changes: 19 additions & 0 deletions 2.2.2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

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

IMAGE=singularity-ncdu-2.2.2.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
39 changes: 39 additions & 0 deletions 2.2.2/modulefile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
--
-- ncdu 2.2.2 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.2.2")
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.2.2
To unload the module, type
> module unload ncdu/2.2.2
Documentation
-------------
For help, type
> ncdu --help
Tools included in this module are
* ncdu
]])

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

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

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

IMAGE=singularity-ncdu-2.2.2.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.2.2/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.2.2.sif ncdu --help

0 comments on commit 910f01d

Please sign in to comment.