Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 9 insertions, 2 deletions
-rwxr-xr-xcsg11
diff --git a/csg b/csg
index 1a6082d..fc1119a 100755
--- a/csg
+++ b/csg
@@ -6,8 +6,10 @@
csg_help() {
echo 'Usage: csg [-h | -? | --help]
- csg <source_dir> <destination_dir> <title_format> <base_url> [<scripts_dir>]
+ csg <source_dir> <destination_dir> <title_format> <base_url> [<scripts_dir>]'
+ [ $1 -ne 0 ] && exit $1
+ echo '
Options:
-h, -?, --help Print this help message (also available when given no
arguments)
@@ -33,10 +35,15 @@ Variables (you can predefine):
Dependencies (required):
POSIX shell, realpath, dirname, find, cpio
+Exit codes:
+ 1 Invalid argument
+ 2 No read/write access
+ 3 Blank argument
+ 4 Dependency not found
csg - complicated (static) site generator
Created by Syndamia, https://gitlab.com/Syndamia/csg'
- exit $1
+ exit 0
}
[ -z "$1" -o "$1" = '-h' -o "$1" = '-?' -o "$1" = '--help' ] && csg_help 0