Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Ignore:
Timestamp:
12/15/08 13:00:15 (3 years ago)
Author:
alex
Message:

only copy dir and cst files now, when doing svn update movie binaries. added function to split path in order to not assume, that the first dot is the file extension seperator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib1/svn_Utilities.ls

    r213 r215  
     1-- svn_Utilities 
     2----------------------------------- 
     3-- PROPERTIES: 
     4--!memberProperties: [#name: "svn_Utilities", #scripttype: #parent, #scriptSyntax: #lingo, #comments: "~/Documents/Scripts/lingo/commonMovieScript.ls"] 
     5-- 
     6-- DESCRIPTION: 
     7--               This script externalizes all functions which are related to the use of subversion with director 
     8--                
     9-- 
     10-- REQUIRES: 
     11--               script "alexUtilities" -> ancestor -> basic function provider 
     12--               most functionality is provided through the shell xtra and buddyApi xtra 
     13--               although it should fail gracefully, if those are not present 
     14--               not much will work without them 
     15--               It also requires the svn command line client to be installed on the machine 
     16-- 
     17-- USAGE: 
     18--               This script is instantiated and used in the "tell the stage" block and one of the functions 
     19--               which are defined in script "OSCmenu_Utilities" and which was selected by the user 
     20--               will be executed in "stage scope". That means, that references are made form within the stage context 
     21--               e.g. member("foo") will refer to a member in one of the stages castlibs 
     22--               sprite(x) will refere to sprite(x) in the stages score and so on 
     23-- 
     24--               Please see the descriptions of many of those handlers at: http://www.farbflash.org/trac/HandlerMenu/wiki/utilityHandlers 
     25----------------------------------- 
     26 
    127property ancestor 
    228 
     
    13071333  put the itemdelimiter after thePath 
    13081334   
    1309   extension = "" 
    1310   repeat while length(fname) 
    1311     put the last char of fname before extension 
    1312     delete the last char of fname 
    1313     if char 1 of extension = "." then exit repeat 
    1314   end repeat 
    1315   if char 1 of extension <> "." then 
    1316     put extension after fname 
    1317     extension = "" 
    1318   end if 
     1335  splitpath = mSplitPath(fname) 
     1336  extension = splitpath[#extension] 
     1337  --  extension = "" 
     1338  --  repeat while length(fname) 
     1339  --    put the last char of fname before extension 
     1340  --    delete the last char of fname 
     1341  --    if char 1 of extension = "." then exit repeat 
     1342  --  end repeat 
     1343  --  if char 1 of extension <> "." then 
     1344  --    put extension after fname 
     1345  --    extension = "" 
     1346  --  end if 
    13191347   
    13201348  if ilk(infolist) <> #proplist then 
     
    28222850    thisFile = flist[n] 
    28232851    if thisFile starts ".svn" then next repeat 
    2824     erg = baCopyFileProgress(fromFolder & thisFile, toFolder & thisFile, "Always", "Replacing movie with the version of the working folder", "", 33) 
    2825     if erg <> 0 then 
    2826       alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 
    2827     else 
    2828       put "Replaced file:" && thisFile 
     2852    -- we get ourselves only dir and cast files: 
     2853    len = length(thisFile) 
     2854    ext = thisFile.char[len-3 .. len] 
     2855    if ext = ".dir" or ext = ".cst" then 
     2856      erg = baCopyFileProgress(fromFolder & thisFile, toFolder & thisFile, "Always", "Replacing movie with the version of the working folder", "", 33) 
     2857      if erg <> 0 then 
     2858        alert "An error occurred during copying the file (" & thisFile & "). Error:" && erg 
     2859      else 
     2860        put "Replaced file:" && thisFile 
     2861      end if 
    28292862    end if 
    28302863  end repeat 
    2831    
    28322864   
    28332865end 
Note: See TracChangeset for help on using the changeset viewer.