introvoyz041's picture
Migrated from GitHub
9d54b72 verified
#!/usr/bin/env bash
DIR=${0%/*}
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
cd $DIR
command="singularity $@"
echo "running '$command' in singularity vagrant box"
vagrant ssh -c "$command"
retcode=$?
if [[ $retcode -ne 0 ]]; then
echo "command failed"
exit $retcode
else
echo "command worked"
exit 0
fi