Mercurial > rlm
annotate src/rlm/general_export.clj @ 0:78a630e650d2
initial import
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 18 Oct 2011 00:57:08 -0700 |
parents | |
children |
rev | line source |
---|---|
rlm@0 | 1 (ns rlm.general-export |
rlm@0 | 2 (:use coderloop.export-files) |
rlm@0 | 3 (:use clojure.java.io) |
rlm@0 | 4 (:use [clojure.contrib [duck-streams :only [file-str]]]) |
rlm@0 | 5 (:use [rlm |
rlm@0 | 6 [classpath-utils :only [classpath]] |
rlm@0 | 7 [shell-write :only [sw]]]) |
rlm@0 | 8 (:require clojure.string) |
rlm@0 | 9 (:import java.io.File) |
rlm@0 | 10 (:import [org.apache.commons.io FileUtils])) |
rlm@0 | 11 |
rlm@0 | 12 |
rlm@0 | 13 ;;(def *nailgun* true) |
rlm@0 | 14 ;;; put standard base-path on the classpath |
rlm@0 | 15 (def *standard-base-directory* (file-str "~/.clojure-exports/")) |
rlm@0 | 16 |
rlm@0 | 17 |
rlm@0 | 18 (defn clear-directory [dir] |
rlm@0 | 19 (FileUtils/forceMkdir standard-base-directory) |
rlm@0 | 20 (FileUtils/forceDelete standard-base-directory) |
rlm@0 | 21 (FileUtils/forceMkdir standard-base-directory)) |
rlm@0 | 22 |
rlm@0 | 23 |
rlm@0 | 24 (defn export-bzip [destination bzip-name namespace src lib] |
rlm@0 | 25 (clear-directory *standard-base-directory*) |
rlm@0 | 26 (let [new-dir |
rlm@0 | 27 (file-str |
rlm@0 | 28 (str (.getCanonicalPath standard-base-directory) |
rlm@0 | 29 (File/separatorChar) bzip-name ))] |
rlm@0 | 30 (export-dependencies namespace new-dir src lib) |
rlm@0 | 31 (make-run-script namespace new-dir bzip-name src lib) |
rlm@0 | 32 (bzip-export-files new-dir destination bzip-name ".tar.bz2" src lib))) |
rlm@0 | 33 |
rlm@0 | 34 (defn export-eclipse [target-source-dir target-jar-dir clojure-jar-name namespace]) |