diff options
author | Camil Staps | 2018-02-08 18:13:07 +0100 |
---|---|---|
committer | Camil Staps | 2018-02-08 18:13:07 +0100 |
commit | d1263bc4681fbff5e8114ad9bacba57c8dd68b61 (patch) | |
tree | fa7242ca7b129317abed20d08e4bbfedd523d3d5 | |
parent | Update Clean version (diff) | |
parent | Update alias to a function (diff) |
Merge branch 'master' of github:camilstaps/iClean
-rw-r--r-- | Dockerfile | 1 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | compile.c | 1 |
3 files changed, 8 insertions, 2 deletions
@@ -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 \ @@ -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 @@ -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); |