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

Does not run shell properly on MacOS #8

Open
sealad886 opened this issue Feb 1, 2024 · 1 comment
Open

Does not run shell properly on MacOS #8

sealad886 opened this issue Feb 1, 2024 · 1 comment

Comments

@sealad886
Copy link

Trying to run the build.sh and tarb.sh shell scripts fails due to how MacOS interprets sed command; requires backup file extension as first command.

% bash -x ./build.sh arm64

  • echo

  • set -eu

  • sh -n tarb.sh

  • TMPDIR=build
    ++ awk '/^#binaries.tgz.base64/ { print NR + 1; exit 0; }' tarb.sh

  • BIN_LINE=1142

  • offline=false

  • '[' .arm64 '!=' .o ']'
    ++ head -n1 CHANGELOG

  • ver='v2023.10.22 202310220'

  • echo 'v2023.10.22 202310220'

  • cut -d ' ' -f 2

  • sed -i '/^VERSION=/s/=.*/="v2023.10.22 202310220"/' tarb.sh
    sed: 1: "tarb.sh": undefined label 'arb.sh'

@sealad886
Copy link
Author

sealad886 commented Feb 1, 2024

To fix this, simply find-and-replace in both build.sh and tarb.sh files:
sed -i
-->. sed -i ""
such that the first arg is "" after -i. If you don't have a trailing space after either in your find-and-replace, then your arguments line up perfectly for how MacOS expects this to work and the shell scripts will run correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant