workarounds for fluter
authorAJ ONeal <aj@therootcompany.com>
Sat, 26 Sep 2020 23:18:56 +0000 (23:18 +0000)
committerAJ ONeal <aj@therootcompany.com>
Mon, 5 Oct 2020 22:07:59 +0000 (22:07 +0000)
_webi/template.sh
flutter/install.sh

index 911354ef97527f92a2f51ad8b66cc00d6ebf8246..6ca7bbfe73579537d1216dd29552bae0bada3485 100644 (file)
@@ -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
index 861d67f1f843416f8d6466beb6189fb6e789b9c1..82fac2357271e9840c854541607502a0ec29298b 100644 (file)
@@ -10,8 +10,18 @@ set -u
 #
 # Their defaults are defined in _webi/template.sh at https://github.com/webinstall/packages
 
+# Every package should define these 6 variables
 pkg_cmd_name="flutter"
 
+pkg_dst_cmd="$HOME/.local/opt/flutter/bin/flutter"
+pkg_dst_dir="$HOME/.local/opt/flutter"
+pkg_dst="$pkg_dst_dir"
+
+pkg_src_cmd="$HOME/.local/opt/flutter-v$WEBI_VERSION/bin/flutter"
+pkg_src_dir="$HOME/.local/opt/flutter-v$WEBI_VERSION"
+pkg_src="$pkg_src_dir"
+
+
 pkg_get_current_version() {
     # 'flutter --version' outputs a lot of information:
     #       Flutter 1.19.0-4.1.pre • channel beta • https://github.com/flutter/flutter.git