add ffmpeg
[webi-installers/.git] / _webi / template.sh
index 911354ef97527f92a2f51ad8b66cc00d6ebf8246..a041e41ac3b530cddc2461f8743ef7fd1e855401 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-{
+function __bootstrap_webi() {
 
 set -e
 set -u
@@ -211,7 +211,8 @@ webi_path_add() {
 
     # in case pathman was recently installed and the PATH not updated
     mkdir -p "$_webi_tmp"
-    "$HOME/.local/bin/pathman" add "$1" | grep "export" >> "$_webi_tmp/.PATH.env" || true
+    # prevent "too few arguments" output on bash when there are 0 lines of stdout
+    "$HOME/.local/bin/pathman" add "$1" | grep "export" 2>/dev/null >> "$_webi_tmp/.PATH.env" || true
 }
 
 # group common pre-install tasks as default
@@ -283,12 +284,14 @@ echo "Have a problem? Experience a bug? Please let us know:"
 echo "        https://github.com/webinstall/packages/issues"
 echo ""
 
-{
+function __init_installer() {
 
 {{ installer }}
 
 }
 
+__init_installer
+
 ##
 ##
 ## END custom override functions
@@ -353,3 +356,5 @@ rm -rf "$WEBI_TMP"
 # See? No magic. Just downloading and moving files.
 
 }
+
+__bootstrap_webi