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

Update build-zip.sh: Support for the QUALIFICATION of nativecode #10

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

zaoqi
Copy link
Contributor

@zaoqi zaoqi commented Jul 5, 2019

  • Put quotes around all variables
  • Use curl instead of wget
  • The configuration language becomes a bash DSL that supports more complex configurations.
  • Support:
fdroid org.gnu.icecat IceCatMobile /system/app armeabi-v7a
fdroid org.gnu.icecat IceCatMobile /system/app x86
  • ...

Copy link
Member

@Roboe Roboe left a 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"
Copy link
Member

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.

Copy link
Contributor Author

@zaoqi zaoqi Jul 7, 2019

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

Copy link
Member

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

Copy link
Contributor Author

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
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just... why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant why rewritting

Copy link
Contributor Author

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 Show resolved Hide resolved
build-zip.sh Show resolved Hide resolved
build-zip.sh Outdated Show resolved Hide resolved
build-zip.sh Outdated

local REPO_URL=$(get_repo_base_url $REPO_NAME)
local REPO_URL="$(get_repo_base_url "$REPO_NAME")"
Copy link
Member

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)

build-zip.sh Outdated Show resolved Hide resolved
build-zip.sh Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants