aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2018-02-08 18:13:07 +0100
committerCamil Staps2018-02-08 18:13:07 +0100
commitd1263bc4681fbff5e8114ad9bacba57c8dd68b61 (patch)
treefa7242ca7b129317abed20d08e4bbfedd523d3d5
parentUpdate Clean version (diff)
parentUpdate alias to a function (diff)
Merge branch 'master' of github:camilstaps/iClean
-rw-r--r--Dockerfile1
-rw-r--r--README.md8
-rw-r--r--compile.c1
3 files changed, 8 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 6abb78a..9eae966 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,6 +11,7 @@ RUN ./make_abc.sh \
&& apt-get update -qq \
&& apt-get install -qq $PACKAGES --no-install-recommends \
&& make -B \
+ && mkdir -p /opt/clean/lib/Local \
&& rm -rf \
Clean\ System\ Files \
CleanReadLine \
diff --git a/README.md b/README.md
index 04c1a8f..788076b 100644
--- a/README.md
+++ b/README.md
@@ -22,16 +22,20 @@ Use `docker pull camilstaps/iclean` to pull the latest iClean version.
Run iClean with `docker run --rm -it camilstaps/iclean`.
+If you want to import local files as well you can bindmount your local directory by adding `-v "$PWD":/opt/clean/lib/Local`.
+
If you want history, add `-v ~/.iclean_history:/home/.iclean_history` and `touch ~/.iclean_history` on the host.
You can add imports by creating a template in `~/.iclean_template`, then adding it to the container with `-v ~/.iclean_template:/home/.iclean_template`.
If you care about hard disk wear, add `--tmpfs /tmp:exec,size=1024k` to have iClean build on a ramdisk.
-Make all this an alias:
+Make all this a handy bash function:
```
-alias iclean="docker run --rm -it --tmpfs /tmp:exec,size=1024k -v ~/.iclean_history:/home/.iclean_history -v ~/.iclean_template:/home/.iclean_template camilstaps/iclean"
+iclean(){
+ docker run --rm -it --tmpfs /tmp:exec,size=1024k -v "$PWD":/opt/clean/lib/Local -v ~/.iclean_history:/home/.iclean_history -v ~/.iclean_template:/home/.iclean_template camilstaps/iclean
+}
```
## Without Docker
diff --git a/compile.c b/compile.c
index 7378343..a991dbf 100644
--- a/compile.c
+++ b/compile.c
@@ -78,6 +78,7 @@ int64_t compile(CleanString path, CleanString module) {
"-I $CLEAN_HOME/lib/Platform/Deprecated/ArgEnv "
"-I $CLEAN_HOME/lib/Platform/Deprecated/MersenneTwister "
"-I $CLEAN_HOME/lib/Platform/Deprecated/StdLib "
+ "-I $CLEAN_HOME/lib/Local "
"-b -nt -h 20M %s -o %s",
pathchars, modulechars, modulechars);