Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Pros: Updates config
- Cons: Doesn't keep documentation within config files so config names have to be self explanatory.
- --- Update Prep ---
- 1. Open config file for reading
- 2. Read config settings and store as variables (in an array): old[configname] = currentvalue
- 3. Close file AND (delete OR rename)
- 4. Create new config file with same name
- 6. Open rule file for reading
- 7. Read rule file and store as variables (in an array): new[configname] = delete OR its new value
- 8. Open config for reading file for writing
- --- Begin Update ----
- 9. If ( old[configname] !== new[configname] ) AND NOT ( new[configname] = null ) THEN old[configname] = new[configname]
- 10. If ( old[configname] == delete ) THEN write configname = value to file.
- 11. Close config file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement