bigtinker 0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Books/Mariposa.gut +2 -0
- data/Books/marip10.txt +2598 -0
- data/Notes/changes.lnk +1 -0
- data/Notes/changes.txt +1 -0
- data/Notes/hypernote/hypernote01.txt +1 -0
- data/Notes/hypernote/hypernote02.txt +1 -0
- data/Notes/hypernote/newnote3.txt +2 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.lnk +1 -0
- data/Notes/rwdtinker/RwdtinkerProgrammingQuickStart.txt +11 -0
- data/Notes/rwdtinker/newnote.txt +1 -0
- data/Notes/rwdtinker/rwdtinker01.txt +9 -0
- data/Notes/rwdtinker/testnote2.txt +1 -0
- data/Readme.txt +146 -0
- data/bin/bigtinker +19 -0
- data/code/01rwdcore/01rwdcore.rb +25 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +31 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +10 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +109 -0
- data/code/01rwdcore/test_harness.rb +13 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/superant.com.bigtinker/rwdtinkerversion.rb +10 -0
- data/code/superant.com.gutenberg/changegutenbergname.rb +16 -0
- data/code/superant.com.gutenberg/clearbookscreendisplay.rb +8 -0
- data/code/superant.com.gutenberg/copyfilename.rb +24 -0
- data/code/superant.com.gutenberg/createnewnote.rb +23 -0
- data/code/superant.com.gutenberg/deletegutenbergrecord.rb +21 -0
- data/code/superant.com.gutenberg/gutenbergcreatefile.rb +9 -0
- data/code/superant.com.gutenberg/helptexthashrwdgutenberg.rb +41 -0
- data/code/superant.com.gutenberg/jumplinkupdate.rb +7 -0
- data/code/superant.com.gutenberg/listnamerecord.rb +15 -0
- data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +58 -0
- data/code/superant.com.gutenberg/loadbookrecord.rb +21 -0
- data/code/superant.com.gutenberg/loadconfigurationrecord.rb +36 -0
- data/code/superant.com.gutenberg/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +29 -0
- data/code/superant.com.gutenberg/returntomain.rb +10 -0
- data/code/superant.com.gutenberg/runbackwindow.rb +10 -0
- data/code/superant.com.gutenberg/rungutenbergwindow.rb +57 -0
- data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +27 -0
- data/code/superant.com.gutenberg/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.gutenberg/rwdtinkerversion.rb +10 -0
- data/code/superant.com.gutenberg/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.gutenberg/savegutenbergrecord.rb +20 -0
- data/code/superant.com.gutenberg/savelinkrecord.rb +23 -0
- data/code/superant.com.hypernote/archiveevent.rb +14 -0
- data/code/superant.com.hypernote/changehypernotename.rb +21 -0
- data/code/superant.com.hypernote/clearhypernotescreendisplay.rb +8 -0
- data/code/superant.com.hypernote/clearlinkscreendisplay.rb +8 -0
- data/code/superant.com.hypernote/copyfilename.rb +10 -0
- data/code/superant.com.hypernote/createnewnote.rb +14 -0
- data/code/superant.com.hypernote/deletehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/helptexthashrwdhypernote.rb +74 -0
- data/code/superant.com.hypernote/hyperlinkcreatelinkfile.rb +19 -0
- data/code/superant.com.hypernote/jumplinkupdate.rb +7 -0
- data/code/superant.com.hypernote/listhypernotelinks.rb +55 -0
- data/code/superant.com.hypernote/listhypernotes.rb +63 -0
- data/code/superant.com.hypernote/listlinknotes.rb +33 -0
- data/code/superant.com.hypernote/loadconfigurationrecord.rb +34 -0
- data/code/superant.com.hypernote/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.hypernote/loadlinksrecord.rb +21 -0
- data/code/superant.com.hypernote/loadnoterecord.rb +24 -0
- data/code/superant.com.hypernote/openhelpwindowrwdhyernote.rb +34 -0
- data/code/superant.com.hypernote/returntomain.rb +10 -0
- data/code/superant.com.hypernote/runrwdhypernotconfiguration.rb +12 -0
- data/code/superant.com.hypernote/runrwdhypernotebackwindow.rb +12 -0
- data/code/superant.com.hypernote/rwdhypernotehelpabout.rb +14 -0
- data/code/superant.com.hypernote/rwdtinkerversion.rb +10 -0
- data/code/superant.com.hypernote/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.hypernote/savehypernoterecord.rb +20 -0
- data/code/superant.com.hypernote/savelinkrecord.rb +23 -0
- data/code/superant.com.rwdaddresses/attachtmpcontactphoto.rb +24 -0
- data/code/superant.com.rwdaddresses/clearscreendisplay.rb +15 -0
- data/code/superant.com.rwdaddresses/createnewnamerecord.rb +19 -0
- data/code/superant.com.rwdaddresses/deletecontactrecord.rb +25 -0
- data/code/superant.com.rwdaddresses/deleterwdaddressesupdatefiles.rb +19 -0
- data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +36 -0
- data/code/superant.com.rwdaddresses/helptexthashrwdaddresses.rb +69 -0
- data/code/superant.com.rwdaddresses/jumplinkupdate.rb +9 -0
- data/code/superant.com.rwdaddresses/listnamerecord.rb +15 -0
- data/code/superant.com.rwdaddresses/listvcardrecord.rb +15 -0
- data/code/superant.com.rwdaddresses/loadconfigurationrecord.rb +45 -0
- data/code/superant.com.rwdaddresses/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdaddresses/loadnamerecord.rb +30 -0
- data/code/superant.com.rwdaddresses/openhelpwindowrwdaddresses.rb +30 -0
- data/code/superant.com.rwdaddresses/renamecontact.rb +15 -0
- data/code/superant.com.rwdaddresses/runaddresseswindow.rb +10 -0
- data/code/superant.com.rwdaddresses/runrwdaddressesmenu1.rb +34 -0
- data/code/superant.com.rwdaddresses/runrwdaddresssyncbackwindow.rb +10 -0
- data/code/superant.com.rwdaddresses/rwdaddressesbackwindow.rb +10 -0
- data/code/superant.com.rwdaddresses/rwdaddresseshelpabout.rb +13 -0
- data/code/superant.com.rwdaddresses/rwdtinkerversion.rb +10 -0
- data/code/superant.com.rwdaddresses/saveconfigurationrecord.rb +20 -0
- data/code/superant.com.rwdaddresses/savevcardrecord.rb +76 -0
- data/code/superant.com.rwdaddresses/syncrwdaddress.rb +28 -0
- data/code/superant.com.rwdaddresses/test_cases.rb +46 -0
- data/code/superant.com.rwdaddresses/uploadrwdaddressfiles.rb +46 -0
- data/code/superant.com.rwdaddresses/viewaddressconfiguration.rb +21 -0
- data/code/superant.com.rwdaddresses/viewnamedata.rb +28 -0
- data/code/superant.com.rwdaddresses/viewphoto.rb +4 -0
- data/code/superant.com.rwdaddresses/viewrwdaddressesconfiguration.rb +23 -0
- data/code/superant.com.rwdaddresses/viewtmpcontactphoto.rb +12 -0
- data/code/superant.com.rwdaddresses/viewvcarddata.rb +22 -0
- data/code/superant.com.rwdcalc/ca2multiply.rb +10 -0
- data/code/superant.com.rwdcalc/changescriptname.rb +16 -0
- data/code/superant.com.rwdcalc/clearrubyscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdcalc/clearscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdcalc/deletescriptrecord.rb +20 -0
- data/code/superant.com.rwdcalc/fadd.rb +10 -0
- data/code/superant.com.rwdcalc/frwdcleartape.rb +9 -0
- data/code/superant.com.rwdcalc/frwddivide.rb +10 -0
- data/code/superant.com.rwdcalc/frwdmultiply.rb +10 -0
- data/code/superant.com.rwdcalc/frwdsubtract.rb +10 -0
- data/code/superant.com.rwdcalc/helptexthashrwdcalc.rb +14 -0
- data/code/superant.com.rwdcalc/jumplinkupdate.rb +11 -0
- data/code/superant.com.rwdcalc/listscripts.rb +13 -0
- data/code/superant.com.rwdcalc/loadrubyrecord.rb +20 -0
- data/code/superant.com.rwdcalc/loadscriptrecord.rb +20 -0
- data/code/superant.com.rwdcalc/mathcommands.rb +53 -0
- data/code/superant.com.rwdcalc/openhelpwindowrwdcalc.rb +21 -0
- data/code/superant.com.rwdcalc/playscript.rb +22 -0
- data/code/superant.com.rwdcalc/renamecalcrecord.rb +14 -0
- data/code/superant.com.rwdcalc/runrwdcalcwindow.rb +10 -0
- data/code/superant.com.rwdcalc/rwdadd.rb +10 -0
- data/code/superant.com.rwdcalc/rwdcleartape.rb +9 -0
- data/code/superant.com.rwdcalc/rwddivision.rb +10 -0
- data/code/superant.com.rwdcalc/rwdsubtraction.rb +10 -0
- data/code/superant.com.rwdcalc/savechangedscript.rb +19 -0
- data/code/superant.com.rwdcalc/saverubyscript.rb +20 -0
- data/code/superant.com.rwdcalc/viewscript.rb +18 -0
- data/code/superant.com.rwdcalendar/gh9calendar.rb +40 -0
- data/code/superant.com.rwdcalendar/helptexthashrwdschedule.rb +14 -0
- data/code/superant.com.rwdcalendar/openhelpwindowrwdschedule.rb +17 -0
- data/code/superant.com.rwdshell/changescriptname.rb +16 -0
- data/code/superant.com.rwdshell/clearscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdshell/deletescriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/helptexthashshell.rb +31 -0
- data/code/superant.com.rwdshell/listrubyscripts.rb +13 -0
- data/code/superant.com.rwdshell/listscripts.rb +13 -0
- data/code/superant.com.rwdshell/loadconfigurationrecord.rb +33 -0
- data/code/superant.com.rwdshell/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.rwdshell/loadscriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/openhelpwindowshell.rb +33 -0
- data/code/superant.com.rwdshell/playrubyscript.rb +23 -0
- data/code/superant.com.rwdshell/playscript.rb +23 -0
- data/code/superant.com.rwdshell/returntomain.rb +10 -0
- data/code/superant.com.rwdshell/rubyeval.rb +25 -0
- data/code/superant.com.rwdshell/runrwdshellbackwindow.rb +10 -0
- data/code/superant.com.rwdshell/runrwdshellwindow.rb +12 -0
- data/code/superant.com.rwdshell/rwdshellversion.rb +14 -0
- data/code/superant.com.rwdshell/savechangedscript.rb +19 -0
- data/code/superant.com.rwdshell/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.rwdshell/shelleval.rb +20 -0
- data/code/superant.com.rwdshell/viewrubyscript.rb +18 -0
- data/code/superant.com.rwdshell/viewscript.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +96 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +25 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +27 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +39 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +42 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/superant.com.words/dictlookup.rb +20 -0
- data/code/superant.com.words/jumplinkupdate.rb +6 -0
- data/code/superant.com.words/runfortunewindow.rb +14 -0
- data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
- data/code/superant.com.words/runrwdwordsversion.rb +14 -0
- data/code/superant.com.words/rwdtinkerversion.rb +10 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/bigtinker.dist +3 -0
- data/configuration/language.dist +7 -0
- data/configuration/rwdaddresses.dist +21 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdcalc.dist +8 -0
- data/configuration/rwdcalendar.dist +10 -0
- data/configuration/rwdgutenberg.dist +14 -0
- data/configuration/rwdhypernote.dist +13 -0
- data/configuration/rwdshell.dist +4 -0
- data/configuration/rwdtinker.dist +19 -0
- data/configuration/rwdwords.dist +18 -0
- data/configuration/tinkerwin2variables.dist +17 -0
- data/ev/browser.rb +109 -0
- data/ev/ftools.rb +170 -0
- data/ev/net.rb +750 -0
- data/ev/ruby.rb +819 -0
- data/ev/rwd.rb +1849 -0
- data/ev/sgml.rb +236 -0
- data/ev/thread.rb +63 -0
- data/ev/tree.rb +343 -0
- data/ev/xml.rb +4 -0
- data/extras/cal.rb +158 -0
- data/extras/dict.rb +438 -0
- data/extras/icalendar/base.rb +17 -0
- data/extras/icalendar/calendar.rb +44 -0
- data/extras/icalendar/calendar_parser.rb +237 -0
- data/extras/icalendar/component/alarm.rb +16 -0
- data/extras/icalendar/component/event.rb +25 -0
- data/extras/icalendar/component/freebusy.rb +12 -0
- data/extras/icalendar/component/journal.rb +25 -0
- data/extras/icalendar/component/timezone.rb +26 -0
- data/extras/icalendar/component/todo.rb +21 -0
- data/extras/icalendar/component.rb +91 -0
- data/extras/icalendar/helpers.rb +103 -0
- data/extras/icalendar/parameter.rb +25 -0
- data/extras/icalendar.rb +18 -0
- data/extras/rconftool.rb +380 -0
- data/extras/zip/ioextras.rb +114 -0
- data/extras/zip/stdrubyext.rb +111 -0
- data/extras/zip/tempfile_bugfixed.rb +195 -0
- data/extras/zip/zip.rb +1377 -0
- data/extras/zip/zipfilesystem.rb +558 -0
- data/extras/zip/ziprequire.rb +61 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -0
- data/gui/frontwindow0/superant.com.rwdcalendar/hl9calendar.rwd +27 -0
- data/gui/frontwindow0/superant.com.shellscripts/1listplayscripts.rwd +17 -0
- data/gui/frontwindow0/superant.com.shellscripts/2listscripts.rwd +25 -0
- data/gui/frontwindow0/superant.com.shellscripts/3editscripts.rwd +26 -0
- data/gui/frontwindow0/superant.com.shellscripts/4scriptutilities.rwd +24 -0
- data/gui/frontwindow0/superant.com.shellscripts/6rwdshelleval.rwd +15 -0
- data/gui/frontwindow0/superant.com.shellscripts/cb7rwdrubyeval.rwd +13 -0
- data/gui/frontwindowselectionbegin/selectiontabbegin/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselectionzend/viewselectionzend/wwselectionend.rwd +3 -0
- data/gui/frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +14 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +15 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.addressesphotowindow/yy7addressesphoto.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/00rwdgutenberg.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/10viewnote.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/20listfiles.rwd +35 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/30booklistutilities.rwd +28 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/35displaytab.rwd +10 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberg.rwd +16 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/67viewconfiguration.rwd +40 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.gutenberg/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.gutendisplay/gutendisplaywindow.rwd +9 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/00windowbegin.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/10viewnote.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/20editlinks.rwd +34 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/30noteutilities.rwd +27 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/67viewconfiguration.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/m01menubegin.rwd +18 -0
- data/gui/tinkerbackwindows/superant.com.hypernote/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/fortunerefreshwindowtwo.rwd +9 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/00rwdaddresses.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/11viewnamedata.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/13listnamerecordfiles.rwd +21 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/16editrecord.rwd +39 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/17viewvcardrecord.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/18contactutilities.rwd +34 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/m01menubegin.rwd +18 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddresses/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/20downloadftp.rwd +45 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/70rwddiagnostics.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/88viewconfiguration.rwd +47 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +15 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/zvbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/20floatrwdcalc.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/30intrwdcalc.rwd +23 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/35mathcommands.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/44listplayscripts.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/45listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/46editscriptrecord.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/4scriptutilities.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdcalc/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/44listplayscripts.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/45listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/46editscriptrecord.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/92viewconfiguration.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/94rwddiagnostics.rwd +16 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +42 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.words/3rwdfortune.rwd +14 -0
- data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.words/80tab1.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
- data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +4 -0
- data/init.rb +277 -0
- data/installed/gutenbergdata01.inf +3 -0
- data/installed/hypernotedata1.inf +12 -0
- data/installed/rwdaddressesdata2.inf +8 -0
- data/installed/rwdgutenberg-0.03.inf +9 -0
- data/installed/rwdviewlogo-0.4.inf +4 -0
- data/installed/rwdwaddresses-1.04.inf +13 -0
- data/installed/rwdwhypernote-0.07.inf +7 -0
- data/installed/rwdwwords-0.02.inf +10 -0
- data/lang/en/rwdcalendar/calendar-en.rb +6 -0
- data/lang/en/rwdcore/languagefile.rb +16 -0
- data/lang/es/rwdcalendar/calendar-nl.rb +6 -0
- data/lang/es/rwdcore/languagefile-es.rb +14 -0
- data/lang/jp/rwdcore/languagefile.rb +9 -0
- data/lang/nl/rwdcalendar/calendar-nl.rb +6 -0
- data/lang/nl/rwdcore/languagefile.rb +19 -0
- data/lib/temp.rb +1 -0
- data/names/Angelina Jolie.jpg +0 -0
- data/names/Angelina Jolie.nam +8 -0
- data/names/Angelina Jolie.vcf +8 -0
- data/names/Steven Gibson.jpg +0 -0
- data/names/Steven Gibson.nam +5 -0
- data/names/elektra.jpg +0 -0
- data/names/elektra.nam +7 -0
- data/names/nophoto.jpg +0 -0
- data/rwd_files/HowTo_Addresses.txt +259 -0
- data/rwd_files/HowTo_BigTinker.txt +146 -0
- data/rwd_files/HowTo_Gutenberg.txt +94 -0
- data/rwd_files/HowTo_HyperNote.txt +121 -0
- data/rwd_files/HowTo_RubyEval.html +80 -0
- data/rwd_files/HowTo_RwdCalc.txt +110 -0
- data/rwd_files/HowTo_Shell.txt +257 -0
- data/rwd_files/HowTo_Tinker.txt +425 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/HowTo_Words.txt +132 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/contacttmp.jpg +0 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +54 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +18 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +5 -0
- data/tests/makedist.rb +59 -0
- data/tests/makerwdwaddresses-1.04.rb +40 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdahelloworld-0.5.zip +0 -0
- metadata +447 -0
data/extras/rconftool.rb
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
#!/usr/local/bin/ruby -w
|
|
2
|
+
|
|
3
|
+
# Copyright (c) 2005 Brian Candler
|
|
4
|
+
#
|
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
# of this software and associated documentation files (the "Software"), to
|
|
7
|
+
# deal in the Software without restriction, including without limitation the
|
|
8
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
9
|
+
# sell copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
# furnished to do so, subject to the following conditions:
|
|
11
|
+
#
|
|
12
|
+
# The above copyright notice and this permission notice shall be included in
|
|
13
|
+
# all copies or substantial portions of the Software.
|
|
14
|
+
#
|
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
20
|
+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
21
|
+
# IN THE SOFTWARE.
|
|
22
|
+
|
|
23
|
+
##########################################################################
|
|
24
|
+
# rconftool is a reimplementation of Sam Varshavchik's sysconftool in Ruby.
|
|
25
|
+
# See http://www.courier-mta.org/sysconftool/ for details of the original.
|
|
26
|
+
# Its purpose is to keep configuration files "fresh" when upgrading an
|
|
27
|
+
# application from one version to another, ensuring that all necessary
|
|
28
|
+
# settings are present and obsolete ones removed.
|
|
29
|
+
#
|
|
30
|
+
# rconftool can be called as a library function or from the command line. It
|
|
31
|
+
# can also install groups of files recursively from one directory tree into
|
|
32
|
+
# another.
|
|
33
|
+
##########################################################################
|
|
34
|
+
|
|
35
|
+
require 'fileutils'
|
|
36
|
+
|
|
37
|
+
module Rconftool
|
|
38
|
+
VERSION = "0.1"
|
|
39
|
+
class NoVersionLine < RuntimeError; end
|
|
40
|
+
|
|
41
|
+
# This module function installs a single source (.dist) file to a target
|
|
42
|
+
# location, having first merged in any compatible settings from the
|
|
43
|
+
# target file if it existed previously [if it does not exist, any settings
|
|
44
|
+
# from 'oldfile' are used instead]
|
|
45
|
+
#
|
|
46
|
+
# If the distfile is not in sysconftool format (i.e. doesn't have a
|
|
47
|
+
# ##VERSION: header within the first 20 lines), then for safety it is only
|
|
48
|
+
# installed if the target file does not already exist. No attempt at data
|
|
49
|
+
# merging is made in that case.
|
|
50
|
+
|
|
51
|
+
def self.install(distfile, targetfile=nil, oldfile=nil, opt={})
|
|
52
|
+
debug = opt[:debug] || $stdout
|
|
53
|
+
|
|
54
|
+
targetfile ||= distfile
|
|
55
|
+
if opt[:strip_regexp]
|
|
56
|
+
targetfile = targetfile.sub(opt[:strip_regexp], '')
|
|
57
|
+
oldfile = oldfile.sub(opt[:strip_regexp], '') if oldfile
|
|
58
|
+
end
|
|
59
|
+
if opt[:add_suffix]
|
|
60
|
+
targetfile = targetfile + opt[:add_suffix]
|
|
61
|
+
oldfile = oldfile + opt[:add_suffix] if oldfile
|
|
62
|
+
end
|
|
63
|
+
raise Errno::EEXIST, "#{distfile}: dist and target filenames are the same" if distfile == targetfile
|
|
64
|
+
|
|
65
|
+
# Read in the source (.dist) file
|
|
66
|
+
begin
|
|
67
|
+
src = ConfigFile.new(distfile)
|
|
68
|
+
rescue NoVersionLine
|
|
69
|
+
# Fallback behaviour when installing a file which is not in sysconftool
|
|
70
|
+
# format: we install the file only if it doesn't already exist
|
|
71
|
+
if File.exist?(targetfile)
|
|
72
|
+
debug << "#{targetfile}: already exists, skipping\n"
|
|
73
|
+
return
|
|
74
|
+
end
|
|
75
|
+
return if opt[:noclobber]
|
|
76
|
+
copyfrom = (oldfile and File.exist?(oldfile)) ? oldfile : distfile
|
|
77
|
+
if File.symlink?(copyfrom)
|
|
78
|
+
File.symlink(File.readlink(copyfrom), targetfile)
|
|
79
|
+
debug << "#{targetfile}: symlink copied from #{copyfrom}\n"
|
|
80
|
+
else
|
|
81
|
+
FileUtils.cp copyfrom, targetfile, :preserve=>true
|
|
82
|
+
debug << "#{targetfile}: copied from #{copyfrom}\n"
|
|
83
|
+
end
|
|
84
|
+
return
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# OK, so we have a sysconftool file to install. Read in the existing
|
|
88
|
+
# target file, or if that does not exist, the oldfile
|
|
89
|
+
begin
|
|
90
|
+
old = ConfigFile.new
|
|
91
|
+
old.read(targetfile)
|
|
92
|
+
rescue NoVersionLine
|
|
93
|
+
# That's OK; the old target will be renamed to .bak
|
|
94
|
+
rescue Errno::ENOENT
|
|
95
|
+
begin
|
|
96
|
+
target_missing = true
|
|
97
|
+
old.read(oldfile) if oldfile
|
|
98
|
+
rescue Errno::ENOENT, NoVersionLine
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Same VERSION? No merge is required
|
|
103
|
+
if src.version == old.version and not opt[:force]
|
|
104
|
+
if target_missing
|
|
105
|
+
FileUtils.cp oldfile, targetfile, :preserve=>true
|
|
106
|
+
debug << "#{targetfile}: same VERSION, copied from #{oldfile}\n"
|
|
107
|
+
return
|
|
108
|
+
end
|
|
109
|
+
debug << "#{targetfile}: same VERSION, no change\n"
|
|
110
|
+
return
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Merge in old settings (note: any settings which are in targetfile but
|
|
114
|
+
# not in distfile will be silently dropped)
|
|
115
|
+
debug << "#{targetfile}:\n"
|
|
116
|
+
src.settings[1..-1].each do |src_setting|
|
|
117
|
+
name = src_setting.name
|
|
118
|
+
old_setting = old[name]
|
|
119
|
+
unless old_setting
|
|
120
|
+
debug << " #{name}: new\n"
|
|
121
|
+
next
|
|
122
|
+
end
|
|
123
|
+
if old_setting.version == src_setting.version
|
|
124
|
+
debug << " #{name}: unchanged\n"
|
|
125
|
+
src_setting.add_comment("\n DEFAULT SETTING from #{distfile}:\n")
|
|
126
|
+
src_setting.add_comment(src_setting.content)
|
|
127
|
+
src_setting.content = old_setting.content
|
|
128
|
+
next
|
|
129
|
+
end
|
|
130
|
+
# Otherwise, must install updated setting and comment out
|
|
131
|
+
# the current setting for reference
|
|
132
|
+
debug << " #{name}: UPDATED\n"
|
|
133
|
+
src_setting.add_comment("\n Previous setting (inserted by rconftool):\n\n")
|
|
134
|
+
src_setting.add_comment(old_setting.content)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
return if opt[:noclobber]
|
|
138
|
+
|
|
139
|
+
# Write out the new file and carry forward permissions
|
|
140
|
+
begin
|
|
141
|
+
tempfile = targetfile+".new#{$$}"
|
|
142
|
+
src.write(tempfile)
|
|
143
|
+
st = File.stat(distfile)
|
|
144
|
+
begin
|
|
145
|
+
File.chown(st.uid, st.gid, tempfile)
|
|
146
|
+
rescue Errno::EPERM
|
|
147
|
+
end
|
|
148
|
+
File.chmod(st.mode, tempfile)
|
|
149
|
+
File.rename(targetfile, targetfile+".bak") unless target_missing
|
|
150
|
+
File.rename(tempfile, targetfile)
|
|
151
|
+
rescue
|
|
152
|
+
File.delete(tempfile) rescue nil
|
|
153
|
+
raise
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
HEADER_ID = '__header__'
|
|
158
|
+
|
|
159
|
+
# Object to represent a single setting
|
|
160
|
+
|
|
161
|
+
class Setting
|
|
162
|
+
attr_reader :name, :version
|
|
163
|
+
attr_accessor :content
|
|
164
|
+
|
|
165
|
+
def initialize(name, version)
|
|
166
|
+
@name = name.gsub(/\s+/,'')
|
|
167
|
+
@version = version.gsub(/s+/,'')
|
|
168
|
+
@comment = ""
|
|
169
|
+
@content = ""
|
|
170
|
+
@in_content = false
|
|
171
|
+
end
|
|
172
|
+
def <<(str)
|
|
173
|
+
@in_content = true unless /\A#/ =~ str
|
|
174
|
+
if @in_content
|
|
175
|
+
@content << str
|
|
176
|
+
else
|
|
177
|
+
@comment << str
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
# Add text to 'comment' portion of setting, prefixing each line with '#'
|
|
181
|
+
def add_comment(str)
|
|
182
|
+
@comment << str.gsub(/^/,'#')
|
|
183
|
+
end
|
|
184
|
+
def to_s
|
|
185
|
+
return "#{@comment}#{@content}" if @name == HEADER_ID
|
|
186
|
+
return "##NAME: #{@name}:#{@version}\n#{@comment}#{@content}"
|
|
187
|
+
end
|
|
188
|
+
end # class Setting
|
|
189
|
+
|
|
190
|
+
# Object to represent an entire configuration file. It consists of
|
|
191
|
+
# an array of Setting objects, with the first one having a special name
|
|
192
|
+
# (__header__). We also keep a hash of setting name => setting object
|
|
193
|
+
# to enable us to find a particular setting quickly.
|
|
194
|
+
|
|
195
|
+
class ConfigFile
|
|
196
|
+
attr_reader :version, :settings
|
|
197
|
+
|
|
198
|
+
def initialize(filename=nil)
|
|
199
|
+
read(filename) if filename
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# fetch a setting by name
|
|
203
|
+
def [](item)
|
|
204
|
+
@settings_hash[item]
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
def read(filename)
|
|
208
|
+
@version = nil
|
|
209
|
+
curr_setting = Setting.new(HEADER_ID,'')
|
|
210
|
+
@settings = [curr_setting]
|
|
211
|
+
@settings_hash = {}
|
|
212
|
+
|
|
213
|
+
File.open(filename) do |f|
|
|
214
|
+
# VERSION header must occur within first 20 lines
|
|
215
|
+
20.times do
|
|
216
|
+
line = f.gets
|
|
217
|
+
break unless line
|
|
218
|
+
curr_setting << line
|
|
219
|
+
if line =~ /\A##VERSION:/
|
|
220
|
+
@version = line
|
|
221
|
+
break
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
raise NoVersionLine, "#{filename}: No VERSION line found" unless @version
|
|
225
|
+
|
|
226
|
+
while line = f.gets
|
|
227
|
+
unless line =~ /\A##NAME:(.*):(.*)/
|
|
228
|
+
curr_setting << line
|
|
229
|
+
next
|
|
230
|
+
end
|
|
231
|
+
curr_setting = Setting.new($1,$2)
|
|
232
|
+
@settings << curr_setting
|
|
233
|
+
@settings_hash[curr_setting.name] = curr_setting
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
def write(filename)
|
|
239
|
+
File.open(filename,"w") do |f|
|
|
240
|
+
@settings.each do |s|
|
|
241
|
+
f << s.to_s
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
end # class ConfigFile
|
|
246
|
+
|
|
247
|
+
# Yield directory contents recursively, without doing chdir(). Note
|
|
248
|
+
# that yielded pathnames are relative to the base directory given;
|
|
249
|
+
# so that, for example, you can simulate 'cp -r /foo/bar/ /baz/' by
|
|
250
|
+
# recurse_dir("/foo/bar") { |n| copy("/foo/bar/"+n,"/baz/"+n) unless
|
|
251
|
+
# File.directory?("/foo/bar/"+n) }
|
|
252
|
+
# Current behaviour is that if a directory is a symlink, we follow it.
|
|
253
|
+
# (Perhaps the block we yield should return true/false?)
|
|
254
|
+
|
|
255
|
+
def self.recurse_dir(base)
|
|
256
|
+
base = base+File::SEPARATOR unless base[-1,1] == File::SEPARATOR
|
|
257
|
+
dirs = ['']
|
|
258
|
+
while dir = dirs.pop
|
|
259
|
+
yield dir unless dir == ''
|
|
260
|
+
Dir.foreach(base+dir) do |n|
|
|
261
|
+
next if n == '.' || n == '..'
|
|
262
|
+
target = dir + n
|
|
263
|
+
if File.directory?(base+target)
|
|
264
|
+
dirs << target+File::SEPARATOR
|
|
265
|
+
next
|
|
266
|
+
end
|
|
267
|
+
yield target
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
class Processor
|
|
273
|
+
attr_reader :o
|
|
274
|
+
|
|
275
|
+
# Parse command-line options and set the @o options hash
|
|
276
|
+
|
|
277
|
+
def initialize(argv=nil)
|
|
278
|
+
require 'optparse'
|
|
279
|
+
|
|
280
|
+
@o = { :strip_regexp => /\.dist\z/ }
|
|
281
|
+
return unless argv
|
|
282
|
+
opts = OptionParser.new do |opts|
|
|
283
|
+
opts.banner = "rconftool version #{VERSION}"
|
|
284
|
+
opts.separator "Usage: #{$0} [options]"
|
|
285
|
+
opts.separator ""
|
|
286
|
+
opts.separator "Specific options:"
|
|
287
|
+
|
|
288
|
+
opts.on("-n", "--noclobber", "Dummy run") do
|
|
289
|
+
@o[:noclobber] = true
|
|
290
|
+
end
|
|
291
|
+
opts.on("-f", "--force", "Update files even if VERSION is same") do
|
|
292
|
+
@o[:force] = true
|
|
293
|
+
end
|
|
294
|
+
opts.on("-q", "--quiet", "No progress reporting") do
|
|
295
|
+
@o[:debug] = ""
|
|
296
|
+
end
|
|
297
|
+
opts.on("--targetdir DIR", "Where to write merged config files") do |dir|
|
|
298
|
+
@o[:targetdir] = dir
|
|
299
|
+
end
|
|
300
|
+
opts.on("--olddir DIR", "If file does not exist in targetdir,",
|
|
301
|
+
"try to merge from here") do |dir|
|
|
302
|
+
@o[:olddir] = dir
|
|
303
|
+
end
|
|
304
|
+
opts.on("--[no-]recursive", "Traverse directories recursively") do |v|
|
|
305
|
+
@o[:recursive] = v
|
|
306
|
+
end
|
|
307
|
+
opts.on("--strip-suffix FOO", "Remove suffix FOO from target filenames",
|
|
308
|
+
"(default .dist)") do |suffix|
|
|
309
|
+
@o[:strip_regexp] = /#{Regexp.escape(suffix)}\z/
|
|
310
|
+
end
|
|
311
|
+
opts.on("-a", "--add-suffix FOO", "Add suffix FOO to target filenames") do |suffix|
|
|
312
|
+
@o[:add_suffix] = suffix
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
opts.on_tail("-?", "--help", "Show this message") do
|
|
316
|
+
puts opts
|
|
317
|
+
exit
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
opts.parse!(argv)
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Process a list of files, [src1,src2,...]. If recursive mode has been
|
|
324
|
+
# enabled, then subdirectories of destdir are created as necessary
|
|
325
|
+
# when 'src' is a directory, and the mode/ownership of these newly
|
|
326
|
+
# created directories is copied from the original.
|
|
327
|
+
|
|
328
|
+
def run(files)
|
|
329
|
+
done_work = false
|
|
330
|
+
files.each do |f|
|
|
331
|
+
if not File.directory?(f)
|
|
332
|
+
dst = old = nil
|
|
333
|
+
dst = @o[:targetdir] + File::SEPARATOR + File.basename(f) if @o[:targetdir]
|
|
334
|
+
old = @o[:olddir] + File::SEPARATOR + File.basename(f) if @o[:olddir]
|
|
335
|
+
Rconftool::install(f, dst, old, @o)
|
|
336
|
+
elsif not @o[:recursive]
|
|
337
|
+
raise Errno::EISDIR, "#{f} (not copied). Need --recursive?"
|
|
338
|
+
else
|
|
339
|
+
Rconftool::recurse_dir(f) do |nf|
|
|
340
|
+
src = f + File::SEPARATOR + nf
|
|
341
|
+
dst = old = nil
|
|
342
|
+
dst = @o[:targetdir] + File::SEPARATOR + nf if @o[:targetdir]
|
|
343
|
+
old = @o[:olddir] + File::SEPARATOR + nf if @o[:olddir]
|
|
344
|
+
if File.directory?(src)
|
|
345
|
+
if dst and not File.directory?(dst)
|
|
346
|
+
orig = File.stat(src)
|
|
347
|
+
Dir.mkdir(dst, orig.mode)
|
|
348
|
+
begin
|
|
349
|
+
File.chown(orig.uid, orig.gid, dst)
|
|
350
|
+
rescue Errno::EPERM
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
else
|
|
354
|
+
Rconftool::install(src, dst, old, @o)
|
|
355
|
+
end
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
done_work = true
|
|
359
|
+
end
|
|
360
|
+
unless done_work
|
|
361
|
+
$stderr.puts "Usage: #{$0} [options] src1 src2 ...\n"+
|
|
362
|
+
"Try #{$0} --help for more information\n"
|
|
363
|
+
exit 1
|
|
364
|
+
end
|
|
365
|
+
end
|
|
366
|
+
end # class Processor
|
|
367
|
+
|
|
368
|
+
end # module Rconftool
|
|
369
|
+
|
|
370
|
+
# Run from command line?
|
|
371
|
+
if __FILE__ == $0
|
|
372
|
+
|
|
373
|
+
begin
|
|
374
|
+
s = Rconftool::Processor.new(ARGV)
|
|
375
|
+
s.run(ARGV)
|
|
376
|
+
rescue Exception => e
|
|
377
|
+
$stderr.puts "#{$0}: #{e}"
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
module IOExtras
|
|
2
|
+
module FakeIO
|
|
3
|
+
def kind_of?(object)
|
|
4
|
+
object == IO || super
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
# Implements many of the convenience methods of IO
|
|
9
|
+
# such as gets, getc, readline and readlines
|
|
10
|
+
# depends on: input_finished?, produce_input and read
|
|
11
|
+
module AbstractInputStream
|
|
12
|
+
include Enumerable
|
|
13
|
+
include FakeIO
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
super
|
|
17
|
+
@lineno = 0
|
|
18
|
+
@outputBuffer = ""
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
attr_accessor :lineno
|
|
22
|
+
|
|
23
|
+
def readlines(aSepString = $/)
|
|
24
|
+
retVal = []
|
|
25
|
+
each_line(aSepString) { |line| retVal << line }
|
|
26
|
+
return retVal
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def gets(aSepString=$/)
|
|
30
|
+
@lineno = @lineno.next
|
|
31
|
+
return read if aSepString == nil
|
|
32
|
+
aSepString="#{$/}#{$/}" if aSepString == ""
|
|
33
|
+
|
|
34
|
+
bufferIndex=0
|
|
35
|
+
while ((matchIndex = @outputBuffer.index(aSepString, bufferIndex)) == nil)
|
|
36
|
+
bufferIndex=@outputBuffer.length
|
|
37
|
+
if input_finished?
|
|
38
|
+
return @outputBuffer.empty? ? nil : flush
|
|
39
|
+
end
|
|
40
|
+
@outputBuffer << produce_input
|
|
41
|
+
end
|
|
42
|
+
sepIndex=matchIndex + aSepString.length
|
|
43
|
+
return @outputBuffer.slice!(0...sepIndex)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def flush
|
|
47
|
+
retVal=@outputBuffer
|
|
48
|
+
@outputBuffer=""
|
|
49
|
+
return retVal
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def readline(aSepString = $/)
|
|
53
|
+
retVal = gets(aSepString)
|
|
54
|
+
raise EOFError if retVal == nil
|
|
55
|
+
return retVal
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def each_line(aSepString = $/)
|
|
59
|
+
while true
|
|
60
|
+
yield readline(aSepString)
|
|
61
|
+
end
|
|
62
|
+
rescue EOFError
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
alias_method :each, :each_line
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
#relies on <<
|
|
70
|
+
module AbstractOutputStream
|
|
71
|
+
include FakeIO
|
|
72
|
+
|
|
73
|
+
def write(data)
|
|
74
|
+
self << data
|
|
75
|
+
data.to_s.length
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def print(*params)
|
|
80
|
+
self << params.to_s << $\.to_s
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def printf(aFormatString, *params)
|
|
84
|
+
self << sprintf(aFormatString, *params)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def putc(anObject)
|
|
88
|
+
self << case anObject
|
|
89
|
+
when Fixnum then anObject.chr
|
|
90
|
+
when String then anObject
|
|
91
|
+
else raise TypeError, "putc: Only Fixnum and String supported"
|
|
92
|
+
end
|
|
93
|
+
anObject
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def puts(*params)
|
|
97
|
+
params << "\n" if params.empty?
|
|
98
|
+
params.flatten.each {
|
|
99
|
+
|element|
|
|
100
|
+
val = element.to_s
|
|
101
|
+
self << val
|
|
102
|
+
self << "\n" unless val[-1,1] == "\n"
|
|
103
|
+
}
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
end # IOExtras namespace module
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
# Copyright (C) 2002-2004 Thomas Sondergaard
|
|
113
|
+
# rubyzip is free software; you can redistribute it and/or
|
|
114
|
+
# modify it under the terms of the ruby license.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
unless Enumerable.method_defined?(:inject)
|
|
2
|
+
module Enumerable #:nodoc:all
|
|
3
|
+
def inject(n = 0)
|
|
4
|
+
each { |value| n = yield(n, value) }
|
|
5
|
+
n
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
module Enumerable #:nodoc:all
|
|
11
|
+
# returns a new array of all the return values not equal to nil
|
|
12
|
+
# This implementation could be faster
|
|
13
|
+
def select_map(&aProc)
|
|
14
|
+
map(&aProc).reject { |e| e.nil? }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
unless Object.method_defined?(:object_id)
|
|
19
|
+
class Object
|
|
20
|
+
# Using object_id which is the new thing, so we need
|
|
21
|
+
# to make that work in versions prior to 1.8.0
|
|
22
|
+
alias object_id id
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
unless File.respond_to?(:read)
|
|
27
|
+
class File
|
|
28
|
+
# singleton method read does not exist in 1.6.x
|
|
29
|
+
def self.read(fileName)
|
|
30
|
+
open(fileName) { |f| f.read }
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
class String
|
|
36
|
+
def starts_with(aString)
|
|
37
|
+
rindex(aString, 0) == 0
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def ends_with(aString)
|
|
41
|
+
index(aString, -aString.size)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def ensure_end(aString)
|
|
45
|
+
ends_with(aString) ? self : self + aString
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def lchop
|
|
49
|
+
slice(1, length)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class Time
|
|
54
|
+
|
|
55
|
+
#MS-DOS File Date and Time format as used in Interrupt 21H Function 57H:
|
|
56
|
+
#
|
|
57
|
+
# Register CX, the Time:
|
|
58
|
+
# Bits 0-4 2 second increments (0-29)
|
|
59
|
+
# Bits 5-10 minutes (0-59)
|
|
60
|
+
# bits 11-15 hours (0-24)
|
|
61
|
+
#
|
|
62
|
+
# Register DX, the Date:
|
|
63
|
+
# Bits 0-4 day (1-31)
|
|
64
|
+
# bits 5-8 month (1-12)
|
|
65
|
+
# bits 9-15 year (four digit year minus 1980)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def to_binary_dos_time
|
|
69
|
+
(sec/2) +
|
|
70
|
+
(min << 5) +
|
|
71
|
+
(hour << 11)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def to_binary_dos_date
|
|
75
|
+
(day) +
|
|
76
|
+
(month << 5) +
|
|
77
|
+
((year - 1980) << 9)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Dos time is only stored with two seconds accuracy
|
|
81
|
+
def dos_equals(other)
|
|
82
|
+
to_i/2 == other.to_i/2
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def self.parse_binary_dos_format(binaryDosDate, binaryDosTime)
|
|
86
|
+
second = 2 * ( 0b11111 & binaryDosTime)
|
|
87
|
+
minute = ( 0b11111100000 & binaryDosTime) >> 5
|
|
88
|
+
hour = (0b1111100000000000 & binaryDosTime) >> 11
|
|
89
|
+
day = ( 0b11111 & binaryDosDate)
|
|
90
|
+
month = ( 0b111100000 & binaryDosDate) >> 5
|
|
91
|
+
year = ((0b1111111000000000 & binaryDosDate) >> 9) + 1980
|
|
92
|
+
begin
|
|
93
|
+
return Time.local(year, month, day, hour, minute, second)
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class Module
|
|
99
|
+
def forward_message(forwarder, *messagesToForward)
|
|
100
|
+
methodDefs = messagesToForward.map {
|
|
101
|
+
|msg|
|
|
102
|
+
"def #{msg}; #{forwarder}(:#{msg}); end"
|
|
103
|
+
}
|
|
104
|
+
module_eval(methodDefs.join("\n"))
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
# Copyright (C) 2002, 2003 Thomas Sondergaard
|
|
110
|
+
# rubyzip is free software; you can redistribute it and/or
|
|
111
|
+
# modify it under the terms of the ruby license.
|