From 2462d97b71681811a433e6c4cdda69be00241642 Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Mon, 31 Aug 2020 13:15:30 -0500 Subject: [PATCH] execution in zsh and bash --- .gitignore | 15 +++++++++++++++ config/install-packages | 9 --------- docker/emacs/Dockerfile | 3 +-- scientific-emacs | 25 ++++++++++++++++++------- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 9e18dee..72f8980 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,17 @@ config/.emacs.d config/texmf +config/.zshrc +config/.viminfo +config/.zcompdump-* +config/.zshrc +config/.zsh_history +config/.local +config/.oh-my-zsh +config/.shell.pre-oh-my-zsh +config/.zcompdump +config/.cache +config/.bash_history +config/.cache +config/.zshrc.pre-oh-my-zsh +.DS_Store +dump.rdb diff --git a/config/install-packages b/config/install-packages index db885a8..20c7780 100755 --- a/config/install-packages +++ b/config/install-packages @@ -1,13 +1,4 @@ #!/bin/zsh -tlmgr init-usertree - -echo "Installing latex live packages" -tlmgr install babel babel-spanis infwarerr \ - blindtext IEEEtran amsmath booktabs\ - tikz pgfplots siunitx tikzposter\ - graphics biblatex algorithmic\ - algorithm2e algorithmcx program\ - pgf ms xcolor echor "Installing oh my zshell" sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" diff --git a/docker/emacs/Dockerfile b/docker/emacs/Dockerfile index 6e94901..9fad517 100644 --- a/docker/emacs/Dockerfile +++ b/docker/emacs/Dockerfile @@ -28,8 +28,7 @@ python3 \ zsh # oh-my-zshell -RUN sh -c "$(wget -O- https://raw.githubusercontent.com/deluan/zsh-in-docker/master/zsh-in-docker.sh)" -- \ - -p git -p ssh-agent +RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # entrypoint ENTRYPOINT ["zsh"] diff --git a/scientific-emacs b/scientific-emacs index c281f67..649ac8c 100755 --- a/scientific-emacs +++ b/scientific-emacs @@ -1,12 +1,23 @@ #!/usr/bin/env zsh -# scriipt to obatin machine's ip and run the docker container +# script to obatin machine's ip and run the docker container ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') xhost + $ip +echo 'checking redis ...' +if [ "$(docker container inspect -f '{{.State.Status}}' this_redis)" = "running" ]; then + echo 'starting redis' + docker start this_redis +else + echo 'running redis...' + docker run --name this_redis redis +fi + +# scientific echo 'running scientific-emacs:0.1' docker run --rm -it \ - -v `pwd`/config:/root \ - -v `pwd`:/home\ - -e DISPLAY=$ip:0 \ - -v /tmp/.X11-unix:/tmp/.X11-unix \ - --link this_redis \ - gmarxcc/scientific-emacs:0.1 +-v `pwd`/config:/root \ +-v `pwd`:/home \ +-e DISPLAY=$ip:0 \ +-v /tmp/.X11-unix:/tmp/.X11-unix \ +--link this_redis \ +gmarxcc/scientific-emacs:0.1 +# end