-
Notifications
You must be signed in to change notification settings - Fork 42
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
Automatically call batch.sh commands when files re missing (mateor/auto-patcher#74) #123
base: master
Are you sure you want to change the base?
Conversation
…e changes in auto_patcher.
…ith style changes in auto_patcher." This reverts commit 2126684.
…her, and refactor to auto_patcher to not run body commands unless it is not sourced from batch.sh
…s not detected; allow legacy call from batch.sh via sourcing auto_patcher.
Okay, I think I need to hear a little more about your thinking here...I do understand the desire to remove duplicate code (very much) but I think if the cost is an if wrapper around the entire script, we might be better off with the duplicate code at this point. Do you think we can find a way around that wrapper? From an end-user point of view (basically my philosophy is that the ease of use and error-catching above everything else) I think that adding batch.sh if the .tgz files are not found is very beneficial...but I think we might gone overboard on how this is implemented. Am I following your thinking right? Feel free to convince me otherwise, I am very open to discussion. Also, maybe there is an environmental issue? This is my output from the test I ran...http://pastebin.com/Mw8Hruze The top of that paste is a diff showing the changes of yours I have, in case I missed one. At the end is the commands I ran. |
Well, the reason I wanted to implement this a certain was is my experience from Python, as it makes testing scripts, specifically those that will be library components much easier. I even specifically looked for the To take this further, the second reason would be for unit testing ideas you had. Unless you want to keep the unit tests in the As for your error, a quick glance makes it look like, yes, you got it right. I am not sure why the patch detection fails then. As I always try patching a ROM to test before handing off changes to you. It sounds like you do the same. Not sure what to do about that. I am really busy this week, so maybe I will take a look on the weekend if you do not mind? |
Okay, I did a little reading on that and see more what you were thinking. I know the python syntax, but have written only very basic scripts with it. I had to Google the convention! I just (hopefully) finished the auto-updating feature that I accidentally spammed our history with. I added a .config file to the autopatcher so that people like you and I could turn off auto-updating, as it won't play very nicely with edits to our local script or branches. I added a flag for PRODUCTION with the test suite in mind. Do you think we could use some sort of flag there? Ideally, it could be set by the command line as well, if we have to manually edit the .config file to run tests, then I think the wrapper is better. I am closer to merging it now than I was the other day, I have a better idea of what was trying to be accomplished. Let's think on it some more as batch.sh gets fixed, etc. And there is no rush, whenever you feel the urge to tinker is just great with me. |
How about this idea: since we would be calling batch.sh from within the auto-patcher, and the auto_patcher has
I am implementing something similar from a kinda toy script I am writing to automate populating and processing the autopatche patches from builds. It would be best to use something we actually need in batch.sh, like ROMX. |
This is meant to fix #74 by doing the following:
batch.sh
commands into a function inauto_patcher
,prep_patches
.expath
andabspath
functions and just sourceauto_patcher
directly.batch.sh
just call theprep_patches
function from the sourceauto_patcher
file.