Re: EuGeany 1.2 - now available for download
- Posted by K_D_R Mar 10, 2013
- 1617 views
_tom said...
After experimenting, I manged to break my Geany installation. It currently recognizes no files when I try the file open dialog (all directory listings are completely blank). At the moment I lack the time to figure this out.
In the mean time try this bit of code:
include std/console.e include std/filesys.e sequence pwd = current_dir() & "/" sequence path = getenv( "HOME") & "/.config/geany" sequence destination sequence filedata = { { "/filedefs/" , "filetype_extensions.conf" }, {"/" , "snippets.conf"}, {"/filedefs/" , "filetypes.Euphoria.conf"}, {"/tags/" , "std.euphoria-4.1.e.tags" } } for i=1 to length( filedata ) do -- BACKUP OLD FILES destination = path & filedata[i][1] & filedata[i][2] display( "\n----------- " & destination ) if file_exists( destination ) then puts(1, "backing up " ) if copy_file( destination, destination & ".bak", 1 ) then puts(1, " ... " ) else display( " !!! backup failed" ) abort(0) end if else display( "... file does not exist ... no backup needed") end if -- UPDATE FILES if copy_file( pwd & filedata[i][2], destination, 1) then display( " updated") else display( " !!! update failed") abort(0) end if end for
_tom
Thanks a million for the installation code, Tom! I'll try to put your routine to good use.
Ken