-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update build-zip.sh: Support for the QUALIFICATION of nativecode #10
base: master
Are you sure you want to change the base?
Conversation
zaoqi
commented
Jul 5, 2019
•
edited
Loading
edited
- Put quotes around all variables
- Use curl instead of wget
- The configuration language becomes a bash DSL that supports more complex configurations.
- Support:
- ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature you want to implement is interesting. Thanks for submiting it. But I think the implementation could be improved.
I can understand why you did some changes like querying package's version name instead of the version code, but I cannot understand why you replaced wget for cURL and rewrote the Main section. Contributing to a codebase shouldn't be rewriting things for no apparent reason, but to discuss changes. We are open to that.
Also, for that same reason, please use commits appropriately: each change should be a standalone commit. That way we could discuss them separately. It would help to explain why you do some changes in the PR message, too, like the cURL change. Sorry, but I won't review further PR with a single commit for multiple changes, it's time-consuming.
Finally, thanks for pointing at the unquoted variables issue and fixing it!
build-zip.sh
Outdated
--output-document=$FILENAME \ | ||
$URL | ||
} && export -f fetch | ||
curl -o "$FILENAME" "$URL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why using cURL? I'm not against, but downloading a file is a simple usecase that wget supports just fine.
Also, observe how we used command flags/options. Longer names are preferred for readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because busybox's wget
does not support https
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Termux's wget
, as stated in termux/termux-packages#2423
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More scripts use curl
@@ -38,62 +31,65 @@ function get_repo_base_url() { | |||
esac | |||
|
|||
echo $BASE_URL | |||
} && export -f get_repo_base_url | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just... why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant why rewritting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to support complex configurations and remove GNU awk, xargs requirements
build-zip.sh
Outdated
|
||
local REPO_URL=$(get_repo_base_url $REPO_NAME) | ||
local REPO_URL="$(get_repo_base_url "$REPO_NAME")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are outer quotes really necessary? (honestly, I don't recall it myself)