File size: 306 Bytes
9d54b72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/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