Browse Source

execution in zsh and bash

redis
parent
commit
2462d97b71
4 changed files with 34 additions and 18 deletions
  1. +15
    -0
      .gitignore
  2. +0
    -9
      config/install-packages
  3. +1
    -2
      docker/emacs/Dockerfile
  4. +18
    -7
      scientific-emacs

+ 15
- 0
.gitignore View File

@ -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

+ 0
- 9
config/install-packages View File

@ -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)"


+ 1
- 2
docker/emacs/Dockerfile View File

@ -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"]

+ 18
- 7
scientific-emacs View File

@ -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

Loading…
Cancel
Save