Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use awk to split shasum from file #812

merged 1 commit into from Oct 4, 2019


Copy link

commented Oct 4, 2019

This removes the need of converting it to a bash array.

scripts/ Outdated Show resolved Hide resolved
@@ -8,7 +8,7 @@ SCRIPT_DIR="$(dirname "$0")"

# Get the SHASUM of the tarball
SHASUM="$(/usr/bin/shasum -a 256 "${ZIP_FILE}")"
SHASUM="$(/usr/bin/shasum -a 256 "${ZIP_FILE}" | /usr/bin/awk '{ print $1 }')"

This comment has been minimized.

Copy link

designatednerd Oct 4, 2019


Not super-familiar with awk - why $1 instead of $0?

This comment has been minimized.

Copy link

koenpunt Oct 4, 2019

Author Contributor

$0 would print the full input, $1 prints the shasum, and $2 would print the filename.

@koenpunt koenpunt force-pushed the koenpunt:patch-2 branch from be9ee6c to b95114f Oct 4, 2019
@designatednerd designatednerd merged commit def56e2 into apollographql:master Oct 4, 2019
3 checks passed
3 checks passed
CLA Author has signed the Apollo CLA.
continuous-integration/travis-ci/pr The Travis CI build passed
netlify/apollo-ios-docs/deploy-preview Deploy preview ready!
@designatednerd designatednerd added this to the 0.17.0 milestone Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.