#!/bin/sh

if [ -z "$1" ] || [ "$1" = '-h' ] || [ "$1" = '--help' ] || [ "$1" = 'help' ]; then
	FILENAME=$(basename "$0")
	printf "$FILENAME : tool to easily extract tar.gz archives.
Created by Pierre Saunders @saundersp 2021\n\nUsage:
\t$FILENAME archive.tar.gz\n\tExtract content of archive where the command is executed.
\n\t$FILENAME\n\t$FILENAME help\n\t$FILENAME --help\n\t$FILENAME -h\n\tDisplay this usage message.\n"
else
	tar -xzvf "$1"
fi