Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#5490 closed enhancement (fixed)

Reduce code duplication in build/scripts

Reported by: mmadia Owned by: mmadia
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: #5479 Blocking:
Platform: All

Description

From #5479#comment:2 Replying to bonefish:

  • Regarding code duplication in build_haiku_image, build_haiku_cd, and probably other scripts, that's indeed annoying. It would be nice to unify the scripts again or at least move commonly used code to a sourceable helper script. That's material for a separate undertaking, though.

Change History (6)

comment:1 by mmadia, 15 years ago

Blocked By: 5479 added

comment:2 by mmadia, 15 years ago

Owner: changed from bonefish to mmadia
Status: newin-progress

I'm starting by consolidating build_tgz_archive and build_zip_archive into build_archive.

comment:3 by mmadia, 15 years ago

Status: in-progressassigned

hrev36005 condenses those scripts.

Unifying build_haiku_{cd,image}, doesn't seem to be as straight forward. Moving the common bits to a utility script seems more feasible, at least in the short term. Changing the status from in-progress to assigned, as it'll be a few more days before working on this.

comment:4 by mmadia, 15 years ago

Status: assignedin-progress

For unifying build_haiku_cd & build_haiku_image, I plan on having the CD targets add an 'isCD' variable, similar to $isImage. Then it looks like only a few if [ $isCD ]; then would need to be added.

comment:5 by mmadia, 15 years ago

Resolution: fixed
Status: in-progressclosed

Implemented in hrev36123. I don't plan to attempt unifying build_cross_tools[_gcc4] unless requested.

in reply to:  5 comment:6 by bonefish, 15 years ago

Replying to mmadia:

Implemented in hrev36123.

Great, thanks!

I don't plan to attempt unifying build_cross_tools[_gcc4] unless requested.

No, those are different enough that it's not worth it. I also wouldn't expect any other scripts of this kind to be added in the future.

Note: See TracTickets for help on using tickets.