14 lines
303 B
Bash
14 lines
303 B
Bash
|
#!/bin/sh
|
||
|
|
||
|
if [ -z "$1" ]; then
|
||
|
base=`realpath . --relative-to="/data/containers" | cut -d"/" -f1`
|
||
|
if [ "$base" = ".." -o "$base" = "." ]; then
|
||
|
echo "No container given and not within /data/containers"
|
||
|
exit 1
|
||
|
fi
|
||
|
container="$base"
|
||
|
echo "Working on container $container."
|
||
|
else
|
||
|
container="$1"
|
||
|
fi
|