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

refactor Android Flavor and build.prop probe #53

Open
mateor opened this issue Jan 9, 2013 · 4 comments
Open

refactor Android Flavor and build.prop probe #53

mateor opened this issue Jan 9, 2013 · 4 comments

Comments

@mateor
Copy link
Owner

mateor commented Jan 9, 2013

The actual build date query is pretty lean and mean. I really like that section. But the build.prop query section is a horrible mess. It has just grown out of the various Android flavors and there is a bunch of repeated code.

That needs to be slimmed down. I can still call whatever functions are specific to flavors without that whole mess.

@mateor
Copy link
Owner Author

mateor commented Jan 10, 2013

While I am at it...it looks like I could get turn pastime's list of files.txt definitions into a function---I think it is there twice.

Also, at many, many points we test various depths for files. I am sure that could be functioned. Probably save use 75 lines. These mofo's:
[ -f patches/$P/smali.txt ] && SMALI=$(cat patches/$P/smali.txt)
[ -f patches/$P/$A/smali.txt ] && SMALI=$(cat patches/$P/$A/smali.txt)
[ -f patches/$P/$A/$R/smali.txt ] && SMALI=$(cat patches/$P/$A/$R/smali.txt)
[ -f patches/$P/$A/$R/$B/smali.txt ] && SMALI=$(cat patches/$P/$A/$R/$B/smali.txt)

Just have the argument be the filename: depth_test(smali.txt)...etc.,

@mateor
Copy link
Owner Author

mateor commented Jan 11, 2013

romhelp branch currently under way...this is proving to be a massive pain in the butt. Close but not there yet...

@mateor
Copy link
Owner Author

mateor commented Jan 25, 2013

Just a revisit...this needs to happen SO bad. I keep wanting to work on the readability of the code, but the help and error-checks have taken over. But those are getting in real good shape...the refactor is really important. Let's break it into chunks:
all depth testing. This is close, I think in the romhelp branch.
ANDR setting This will take some examination to see just how much smaller it can get, We'll see

To be edited. But I want to do this before I move beyond the shell script.

@mateor
Copy link
Owner Author

mateor commented Mar 4, 2013

Using the 'case' separators ";&" and ";;&" could probably be used to filter ROM types more efficiently.

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

No branches or pull requests

1 participant