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

reduce $DEVICE complexity #1778

Merged
merged 3 commits into from
Jul 15, 2017
Merged

Conversation

Kwiboo
Copy link
Member

@Kwiboo Kwiboo commented Jul 11, 2017

This PR adds support to use $DEVICE in shell version output and also changes to use same formatting as in the settings addon (<device/project>.<arch>)

Before:

LibreELEC (community): devel-20170711073201-r25890-ge7ffdc769 (Rockchip arm)

After:

LibreELEC (community): devel-20170711073201-r25890-ge7ffdc769 (TinkerBoard.arm)

@MilhouseVH
Copy link
Contributor

No objection to this change in principal, but it could be simplified to:

-echo "$DISTRONAME ($LIBREELEC_BUILD): $LIBREELEC_VERSION ($PROJECT $TARGET_ARCH)" >> $INSTALL/etc/issue 
+echo "$DISTRONAME ($LIBREELEC_BUILD): $LIBREELEC_VERSION (${DEVICE:-${PROJECT}}.$TARGET_ARCH)" >> $INSTALL/etc/issue 

The ${DEVICE:-${PROJECT}} approach could probably be used in several other places and would avoid the more cumbersome - but admittedly more explicit - if..then..else.

Just a matter of style/preference, really.

@Kwiboo
Copy link
Member Author

Kwiboo commented Jul 11, 2017

I like the ${DEVICE:-$PROJECT} approach and have pushed a fixup commit to remove some of the if..then..else, will squash after proper testing

@Kwiboo
Copy link
Member Author

Kwiboo commented Jul 11, 2017

I made a small adjustment and defined LIBREELEC_ARCH="${DEVICE:-$PROJECT}.$TARGET_ARCH" that is reused instead

@Kwiboo Kwiboo changed the title scripts/image: use $DEVICE in shell version output reduce $DEVICE complexity Jul 11, 2017
@Kwiboo
Copy link
Member Author

Kwiboo commented Jul 11, 2017

Squashed and updated to use the ${DEVICE:-$PROJECT} approach in config/path and scripts/create_addon.
Also made scripts/image pass $DEVICE to scripts/mkimage

@MilhouseVH
Copy link
Contributor

Looks good to me, @lrusak any concerns?

@MilhouseVH
Copy link
Contributor

Might also be worth backporting this to libreelec-8.2?

@MilhouseVH MilhouseVH merged commit b809dba into LibreELEC:master Jul 15, 2017
@Kwiboo Kwiboo deleted the shell-device-version branch July 15, 2017 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants