summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xarchive-dl11
1 files changed, 8 insertions, 3 deletions
diff --git a/archive-dl b/archive-dl
index 229ec9d..cbf4b93 100755
--- a/archive-dl
+++ b/archive-dl
@@ -3,14 +3,19 @@
input=$1
type=$2
-check()
-if [ -n "$input" ]; then
+# This is a function:
+# It checks if the user has input data.
+check() {
+if [ -n "$1" ]; then
echo
else
- echo "Please enter URL";
+ echo "Please enter URL/File type.";
exit 0
fi
+}
+check $input
+check $type
echo $input
echo $type