Ignore:
Timestamp:
01/31/2011 01:13:47 PM (10 years ago)
Author:
dave
Message:

started fatima code and remote companion sprite update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scenarios/GerminationX/oak/src/oak/island.clj

    r817 r898  
    1414 
    1515(ns oak.island 
    16   (:require [org.danlarkin.json :as json])) 
     16  (:use clojure.contrib.duck-streams) 
     17  (:require [org.danlarkin.json :as json] 
     18            clojure.contrib.java-utils)) 
     19 
     20(defn execute [command] 
     21  (println (str "executing: " command)) 
     22  (let [process (.exec (Runtime/getRuntime) command)] 
     23    (if (= 0 (.waitFor  process)) 
     24        (read-lines (.getInputStream process)) 
     25        (read-lines (.getErrorStream process))))) 
     26 
     27(defn update-islands [srcpath dstpath] 
     28  (when (.exists (clojure.contrib.java-utils/file srcpath)) 
     29    (execute (str "rm " dstpath "/islands/*")) 
     30    (execute (str "cp -r " srcpath " " dstpath)) 
     31    (execute (str "rm -r " srcpath)) 
     32    )) 
    1733 
    1834(defn read-islands [path] 
Note: See TracChangeset for help on using the changeset viewer.