home *** CD-ROM | disk | FTP | other *** search
- /* scan old and new filenames.cfg and find diffs */
-
- say "Hello! This is part of the avm-install script"
- say "I am now checking to see if any of the ARexx scripts"
- say "require you to re-record your voice files. I do this"
- say "by comparing the old filenames.cfg with the new"
- say "filenames.cfg"
-
- say
-
- say "Hold on while I check stuff. Don't worry, you will"
- say "be asked before any deletions are made!"
-
- say
-
- opened = open('new', 'avm:filenames.cfg', 'r')
- if opened ~= 1 then exit
- opened = open('old', 'avm:old/filenames.cfg', 'r')
- if opened ~= 1 then exit
-
- do while ~eof('new')
- line = readln('new')
- parse upper var line variable '=' value
- if variable = 'FILENAME' then filename = value
- if variable = 'COMMENT' then comment = value
- if variable = 'ENDRECORD' then do
- new.filename = comment
- end
- end
-
- do while ~eof('old')
- line = readln('old')
- parse upper var line variable '=' value
- if variable = 'FILENAME' then filename = value
- if variable = 'COMMENT' then comment = value
- if variable = 'ENDRECORD' then do
- if new.filename ~= comment then do
- if symbol('new.filename') = 'LIT' then do
- say 'The file' filename 'is not in the new filenames.cfg.'
- say 'Either you have the Programmer and have added a new'
- say 'voice file or this is an old file that is no longer'
- say 'used.'
- end; else if new.filename ~= comment then do
- say 'The file' filename 'has a new comment'
- say 'Old comment:' comment
- say 'New comment:' new.filename
- end
-
- say 'Should I go ahead and delete the file? (y|n)'
- parse upper pull answer
- if answer = 'Y' | answer = 'YES' then
- address command 'delete' filename
- say
- end
- end
- end
-
- say "You should Configure your Voice Prompts right after"
- say "the installation!"
-
- say
-
- say "Hit <return>"
- parse pull answer
-