fix(unitproc:bktemp-checkURL):Fix typo 0.4.2
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 23 Mar 2021 10:33:40 +0000 (10:33 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Tue, 23 Mar 2021 10:33:40 +0000 (10:33 +0000)
unitproc/bktemp-checkURL

index 81f934d1ff63525835902af838e63be8ad726f6c..6ae6ff05252f747d86c6d0f31bf2f8edaf68cce6 100644 (file)
@@ -3,18 +3,18 @@
 checkURL() {
     # Desc: Checks if string is a valid URL.
     # Warning: Does not correctly handle multi-byte characters.
-    # Version: 0.0.1
+    # Version: 0.0.2
     # Input: arg1: string
     # Output: return code 0: string is a valid URL
     #         return code 1: string is NOT a valid URL
     # Depends: Bash 5.0.3
     # Ref/Attrib: https://stackoverflow.com/a/3184819
     regex='(https?|ftp|file|ssh|git)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
-    string="$1";
-    if [[ $1 =~ $regex ]]; then
+    arg1="$1";
+    if [[ $arg1 =~ $regex ]]; then
        return 0;
     else
-       reutrn 1;
+       return 1;
     fi;
 }