Help text

Display help text when no arguments are given
This commit is contained in:
Jarno Rankinen 2020-08-01 10:04:12 +03:00
parent c38d25a3a5
commit 187673cbd4
1 changed files with 13 additions and 0 deletions

13
snapsh
View File

@ -16,4 +16,17 @@
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
help() {
printf "Usage:
snapsh [OPTIONS]
Options:
Exit codes:
2 - Invalid arguments"
}
# If no options are given, display help
if [[ "$#" -eq 0 ]]; then
help
exit 2
fi