Mercurial > rlm
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:78a630e650d2 |
---|---|
1 (ns rlm.general-export | |
2 (:use coderloop.export-files) | |
3 (:use clojure.java.io) | |
4 (:use [clojure.contrib [duck-streams :only [file-str]]]) | |
5 (:use [rlm | |
6 [classpath-utils :only [classpath]] | |
7 [shell-write :only [sw]]]) | |
8 (:require clojure.string) | |
9 (:import java.io.File) | |
10 (:import [org.apache.commons.io FileUtils])) | |
11 | |
12 | |
13 ;;(def *nailgun* true) | |
14 ;;; put standard base-path on the classpath | |
15 (def *standard-base-directory* (file-str "~/.clojure-exports/")) | |
16 | |
17 | |
18 (defn clear-directory [dir] | |
19 (FileUtils/forceMkdir standard-base-directory) | |
20 (FileUtils/forceDelete standard-base-directory) | |
21 (FileUtils/forceMkdir standard-base-directory)) | |
22 | |
23 | |
24 (defn export-bzip [destination bzip-name namespace src lib] | |
25 (clear-directory *standard-base-directory*) | |
26 (let [new-dir | |
27 (file-str | |
28 (str (.getCanonicalPath standard-base-directory) | |
29 (File/separatorChar) bzip-name ))] | |
30 (export-dependencies namespace new-dir src lib) | |
31 (make-run-script namespace new-dir bzip-name src lib) | |
32 (bzip-export-files new-dir destination bzip-name ".tar.bz2" src lib))) | |
33 | |
34 (defn export-eclipse [target-source-dir target-jar-dir clojure-jar-name namespace]) |