chore(style): add shebang, set bash strict mode, create function
[webi-installers/.git] / xz / install.sh
index 54beb4c12fb1c4cf5bcbe3ec6873118eb05e0416..d57116010fd8effcbcaceef9762dbda3e523f147 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/bash
+set -e
+set -u
 
-{
-    set -e
-    set -u
+function __init_xz() {
 
     ##############
     # Install xz #
@@ -42,6 +42,8 @@
         #       liblzma 5.2.5
         # This trims it down to just the version number:
         #       5.2.5
-        echo $(xz --version 2>/dev/null | head -n 1 | cut -d ' ' -f 4)
+        echo $(xz --version 2> /dev/null | head -n 1 | cut -d ' ' -f 4)
     }
 }
+
+__init_xz