From: AJ ONeal Date: Sat, 26 Sep 2020 23:18:56 +0000 (+0000) Subject: workarounds for fluter X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=8b96119dc9bf00db9224a2bbe8b88b6b17eb7234;p=webi-installers%2F.git workarounds for fluter --- diff --git a/_webi/template.sh b/_webi/template.sh index 911354e..6ca7bbf 100644 --- a/_webi/template.sh +++ b/_webi/template.sh @@ -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 diff --git a/flutter/install.sh b/flutter/install.sh index 861d67f..82fac23 100644 --- a/flutter/install.sh +++ b/flutter/install.sh @@ -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