+ }
+
+ # run post-install functions - just updating PATH by default
+ webi_post_install() {
+ webi_path_add "$(dirname "$pkg_dst_cmd")"
+ }
+
+ _webi_enable_exec() {
+ if [ -n "$(command -v spctl)" ] && [ -n "$(command -v xattr)" ]; then
+ # note: some packages contain files that cannot be affected by xattr
+ xattr -r -d com.apple.quarantine "$pkg_src" || true
+ return 0
+ fi
+ # TODO need to test that the above actually worked
+ # (and proceed to this below if it did not)
+ if [ -n "$(command -v spctl)" ]; then
+ echo "Checking permission to execute '$pkg_cmd_name' on macOS 11+"
+ set +e
+ is_allowed="$(spctl -a "$pkg_src_cmd" 2>&1 | grep valid)"
+ set -e
+ if [ -z "$is_allowed" ]; then
+ echo ""
+ echo "##########################################"
+ echo "# IMPORTANT: Permission Grant Required #"
+ echo "##########################################"
+ echo ""
+ echo "Requesting permission to execute '$pkg_cmd_name' on macOS 10.14+"
+ echo ""
+ sleep 3
+ spctl --add "$pkg_src_cmd"
+ fi
+ fi
+ }
+
+ # a friendly message when all is well, showing the final install path in $HOME/.local
+ _webi_done_message() {
+ echo "Installed $(_webi_canonical_name) as $pkg_dst_cmd"
+ }
+
+ ##
+ ##
+ ## BEGIN custom override functions from <package>/install.sh
+ ##
+ ##
+
+ WEBI_SINGLE=
+
+ if [[ -z ${WEBI_WELCOME:-} ]]; then
+ echo ""
+ printf "Thanks for using webi to install '\e[32m${WEBI_PKG:-}\e[0m' on '\e[31m$(uname -s)/$(uname -m)\e[0m'.\n"
+ echo "Have a problem? Experience a bug? Please let us know:"
+ echo " https://github.com/webinstall/webi-installers/issues"
+ echo ""
+ printf "\e[31mLovin'\e[0m it? Say thanks with a \e[34mStar on GitHub\e[0m:\n"
+ printf " \e[32mhttps://github.com/webinstall/webi-installers\e[0m\n"
+ echo ""