Skip to content

Commit

Permalink
fix: use alias for shasum if sha1sum is found instead
Browse files Browse the repository at this point in the history
Some linux distributions might have sha1sum command available
but shasum might be missing. This will create an alias for shasum
to use sha1sum if available.
  • Loading branch information
micahthomas committed Jan 30, 2024
1 parent a5e2126 commit c3940ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions run_build_tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ void main(List<String> args) {
}
EOF

# Create alias for `shasum` if it does not exist and `sha1sum` exists
if ! [ -x "$(command -v shasum)" ] && [ -x "$(command -v sha1sum)" ]; then
shopt -s expand_aliases
alias shasum="sha1sum"
fi

# Dart run will not cache any package that has a path dependency, which
# is the case for our build_tool_runner. So instead we precompile the package
# ourselves.
Expand Down

0 comments on commit c3940ff

Please sign in to comment.