fix usage

master
TomasM 2019-10-20 09:26:04 +00:00
parent ecdfe750c8
commit 7b243f9781
2 changed files with 26 additions and 4 deletions

View File

@ -51,7 +51,8 @@ activate()
# check if file exists # check if file exists
if [ ! -r "$SB" ]; then if [ ! -r "$SB" ]; then
usage "file not found $SB" usage
die "file not found $SB"
fi fi
# check if the file is part of aufs union, if yes we need to copy it outside # check if the file is part of aufs union, if yes we need to copy it outside
@ -145,8 +146,18 @@ deactivate()
} }
usage()
{
echo "Usage: $0 [ activate | deactivate | list ] [ file.sb ]" >&2
if [ "$1" != "" ]; then
echo "$1" >&2
fi
}
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
die "Usage: $0 [ activate | deactivate | list ] [ file.sb ]" usage
die
fi fi
if [ "$1" = "activate" ]; then if [ "$1" = "activate" ]; then

View File

@ -51,7 +51,8 @@ activate()
# check if file exists # check if file exists
if [ ! -r "$SB" ]; then if [ ! -r "$SB" ]; then
usage "file not found $SB" usage
die "file not found $SB"
fi fi
# check if the file is part of aufs union, if yes we need to copy it outside # check if the file is part of aufs union, if yes we need to copy it outside
@ -145,8 +146,18 @@ deactivate()
} }
usage()
{
echo "Usage: $0 [ activate | deactivate | list ] [ file.sb ]" >&2
if [ "$1" != "" ]; then
echo "$1" >&2
fi
}
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
die "Usage: $0 [ activate | deactivate | list ] [ file.sb ]" usage
die
fi fi
if [ "$1" = "activate" ]; then if [ "$1" = "activate" ]; then