A free and open platform for detecting and preventing email attacks like BEC, malware, and credential phishing. Gain visibility and control, hunt for advanced threats, collaborate with the community, and write detections-as-code.
This PR is broken up into many commits for easier testing and review. This also gives us some capability to cherry-pick a number of commits if we don't want all the changes, though there is still risk of conflicts.
The changes are focused on maximizing portability of the install script. Major considerations are:
Using POSIX-compliant tools whenever possible
Using /bin/sh shebang to promote maximum portability
Combining the install scripts into a single file. This is done for multiple reasons; namely, it ensures users get everything they need for bootstrapping in a single download, and it eliminates our reliance on curl (maybe they downloaded the script using a different tool and it's not available) and bash-specific constructs such as "here strings".
Detecting, prompting, and/or informing the user when a tool is NOT available in their environment
Using shellcheck on everything
Local Testing
cd to a directory outside of sublime-platform
run cat <path-to-sublime-platform>/install-and-launch.sh | sh (bash also still works)
Summary
This PR is broken up into many commits for easier testing and review. This also gives us some capability to cherry-pick a number of commits if we don't want all the changes, though there is still risk of conflicts.
The changes are focused on maximizing portability of the install script. Major considerations are:
/bin/sh
shebang to promote maximum portabilitycurl
(maybe they downloaded the script using a different tool and it's not available) and bash-specific constructs such as "here strings".shellcheck
on everythingLocal Testing
sublime-platform
cat <path-to-sublime-platform>/install-and-launch.sh | sh
(bash also still works)Platform Testing
https://docs.google.com/spreadsheets/d/1Mv04s9MBQfyZwyIXaLO2CaZUKd11MgeTFWiZdSaio-s/edit?usp=sharing
Important Commits
which
withcommand_exists
(which
is not POSIX --command
is): 2b302cde52b5f2f25227cff7acf007296b99a90alsof
is not available (e.g. Fedora by default): f0caed0a60d49793f18e9c2d1f681385112eb5d4/bin/sh
compatibility for main install script: 2fbccdb59fb0186ff8fa3dabe7f0830b73e2b881install_sublime
function: 2d8c662c037482c986adef9f7cc7e10726473957preflight_checks
into main install script: 2d615c91ca418dd6706faab92be014447a934e54launch-sublime-platform
into main install script: 1f2094916d739d8ee8efa6342da2ce0604784bf4preflight_checks.sh
: 6356ac4834c9e886ac5730d566a58d5dcb0fb4e6shell-format
: 6799e90707bfe4d93cf31ed2884f295ef86705f1sh
everywhere: 9c05c8891951a7e4b5771b1a35440a8978f68852openssl
+ formatting: 450a4b1641664e1247606e788474db010d0df4b4read
accepts at least 1 argument: faf175aae623131fc57c36db7694efb0100ff386set -e
: a848b5d97fe8db267b6eb6d54a64590ebe9ecd1dTODO / Future PR
set -e
Screenshots
Fedora 37 (ignore script name, copied file):
Continued...
No openssl: