Advertisement
rcmaehl

Untitled

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