samer@0: ; __________________________________________ samer@0: ; open local args file and push on to environment stack samer@0: ; this will now accept all stored data. also adds agent to samer@0: ; save on exit. samer@0: samer@0: (define local-props null) samer@0: (define local-file null) samer@0: (define (push-properties file) samer@0: (set! local-props (samer.core.util.Properties. (Shell.env))) samer@0: (set! local-file file) samer@0: (tryCatch samer@0: (.load local-props (java.io.FileInputStream. file)) samer@0: (lambda (e) (Shell.trace (string-append "failed to load")))) samer@0: (Shell.push local-props) samer@0: samer@0: ;;; this changes to global exit procedure to save the local samer@0: ;;; properties as well as the regular properties samer@0: (set! exit (lambda () samer@0: (display (string-append "saving local properites to " local-file)) samer@0: (.save local-props (java.io.FileOutputStream. local-file)) samer@0: (Shell.interpret "exit") samer@0: (System.exit 0) samer@0: )) samer@0: ) samer@0: samer@0: