Add help to scripts
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
if [ "$1" = "-h" ]; then
|
||||
echo "usage: digitallify.sh <outputfile> <images_directory>"
|
||||
exit 0
|
||||
elif [ "$1" = "" ]; then
|
||||
echo "Please provide a filename as the first argument"
|
||||
exit 1
|
||||
elif [ "$2" = "" ]; then
|
||||
|
@@ -6,6 +6,14 @@ do
|
||||
if [ ${!i} = "-c" ]
|
||||
then ((i++))
|
||||
comment=${!i};
|
||||
elif [ ${!i} = "-h" ]
|
||||
then ((i++))
|
||||
echo "usage: paperify.sh [OPTIONS] <FILE>"
|
||||
echo ""
|
||||
echo "options:"
|
||||
echo -e " -h\t\tShow this help."
|
||||
echo -e " -c COMMENT\tAdd comment to the generated files."
|
||||
exit 0
|
||||
else
|
||||
file="$INPUT_DIR${!i}";
|
||||
fi
|
||||
|
Reference in New Issue
Block a user