X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=_webi%2Ftemplate.sh;h=274bfa17d01fc107a625e1b296d7cf7003c91f2f;hb=72406c4e0d438b76da054be8d5eff42d08312498;hp=1dc05067f67a9d009fdf2e63d65904e4d5098c64;hpb=5fabdc4760c2f6448b4ad36a7838b45f2d7840ab;p=webi-installers%2F.git diff --git a/_webi/template.sh b/_webi/template.sh index 1dc0506..274bfa1 100644 --- a/_webi/template.sh +++ b/_webi/template.sh @@ -147,7 +147,8 @@ webi_download() { return 0 fi - echo "Downloading $PKG_NAME to $my_dl" + echo "Downloading $PKG_NAME from" + echo "$my_url" # It's only 2020, we can't expect to have reliable CLI tools # to tell us the size of a file as part of a base system... @@ -166,8 +167,10 @@ webi_download() { # TODO curl -fsSL --remote-name --remote-header-name --write-out "$my_url" curl -fSL -H "User-Agent: curl $WEBI_UA" "$my_url" -o "$my_dl.part" fi - mv "$my_dl.part" "$my_dl" + + echo "" + echo "Saved as $my_dl" } # detect which archives can be used @@ -236,6 +239,12 @@ webi_post_install() { } _webi_enable_exec() { + if [ -n "$(command -v spctl)" ] && [ -n "$(command -v xattr)" ] ; then + xattr -r -d com.apple.quarantine "$pkg_src" + 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 @@ -316,10 +325,10 @@ if [ -n "$(command -v pkg_get_current_version)" ]; then webi_link + _webi_enable_exec pushd "$WEBI_TMP" 2>&1 >/dev/null [ -n "$(command -v pkg_post_install)" ] && pkg_post_install || webi_post_install popd 2>&1 >/dev/null - _webi_enable_exec pushd "$WEBI_TMP" 2>&1 >/dev/null [ -n "$(command -v pkg_done_message)" ] && pkg_done_message || _webi_done_message