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

Conversation

Projects
None yet
3 participants
@Kwiboo
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2017

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2017

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

@Kwiboo Kwiboo force-pushed the Kwiboo:shell-device-version branch from 89283e8 to fbc4fd4 Jul 11, 2017

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

@Kwiboo

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2017

Looks good to me, @lrusak any concerns?

@MilhouseVH

This comment has been minimized.

Copy link
Contributor

commented Jul 12, 2017

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 Kwiboo:shell-device-version branch Jul 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.