Skip to content

Commit

Permalink
Added version 2.29.2
Browse files Browse the repository at this point in the history
  • Loading branch information
icaoberg committed Oct 23, 2024
1 parent 07e7193 commit 534db9d
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 0 deletions.
16 changes: 16 additions & 0 deletions 2.29.2/Singularity
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Bootstrap: docker
From: rust:slim-buster

%labels
MAINTAINER icaoberg
EMAIL [email protected]
SUPPORT [email protected]
REPOSITORY https://github.com/icaoberg/singularity-dua
VERSION 2.29.2

%post
cargo install --version 2.29.2 dua-cli --no-default-features --features tui-crossplatform
ln -s /usr/local/cargo/bin/dua /usr/local/bin/dua

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

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

PACKAGE=dua
VERSION=2.29.2
IMAGE=singularity-$PACKAGE-$VERSION.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
18 changes: 18 additions & 0 deletions 2.29.2/dua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

VERSION=2.29.2
PACKAGE=dua
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 "$@"
41 changes: 41 additions & 0 deletions 2.29.2/modulefile.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--
-- dua 2.29.2 modulefile
--
-- "URL: https://www.psc.edu/resources/software"
-- "Category: Other"
-- "Description: du + rust = dua. Like du but more intuitive."
-- "Keywords: singularity utilities"

whatis("Name: dua")
whatis("Version: 2.29.2")
whatis("Category: Other")
whatis("URL: https://www.psc.edu/resources/software")
whatis("Description: du + rust = dua. Like du but more intuitive.")

help([[
du + rust = dua. Like du but more intuitive.
To load the module type
> module load dua/2.29.2
To unload the module type
> module unload dua/2.29.2
Documentation
-------------
For help, type
> dua --help
Repository
----------
Tools included in this module are
* dua
]])

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

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

PACKAGE=dua
VERSION=2.29.2
IMAGE=singularity-$PACKAGE-$VERSION.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.29.2/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -x

tree .

singularity exec singularity-dua-2.29.2.sif dua .

0 comments on commit 534db9d

Please sign in to comment.