Skip to content

Commit

Permalink
Merge pull request #5 from nelsonenzo/issue2
Browse files Browse the repository at this point in the history
fix zsh-spawned processes' argv[0] substituted with tmux executable path
  • Loading branch information
nelsonenzo authored Apr 5, 2020
2 parents d33501c + 918dcd2 commit c5b1645
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## Author: Nelson E Hernandez
## Date:
FROM centos:centos6.9
## install build tools
RUN /usr/bin/yum groupinstall -y "Development Tools"
RUN /usr/bin/yum install -y wget
RUN /usr/bin/yum -y update && /usr/bin/yum groupinstall -y "Development Tools" && yum clean all
RUN /usr/bin/yum install -y wget && yum install -y epel-release && yum install -y jq

RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
&& chmod +x linuxdeploy-x86_64.AppImage \
Expand All @@ -23,4 +22,11 @@ RUN sh autogen.sh && \
./configure --prefix=/tmux/MakeBuild && \
make install

## complete the appimage build.
COPY ./opt /opt
RUN /opt/build.sh

## Produces artifact
## /opt/releases/tmux-3.0a-x86_64.AppImage

CMD /opt/build.sh
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ git clone https://github.com/nelsonenzo/tmux-appimage.git
## compile tmux from source by building container
docker build . -t tmux
## make appimage by running container
docker run -it -v "$PWD"/opt:/opt tmux
## expected output:
./opt/releases/tmux-3.0a-x86_64.AppImage
## extract the appimage file
docker create -ti --name tmuxcontainer tmux bash
docker cp tmuxcontainer:/opt/releases/tmux-3.0a-x86_64.AppImage .
docker rm -f tmuxcontainer
```


## To use AppImage
move appimage to executable location in your $PATH
```
mv ./opt/releases/tmux.*AppImage /usr/bin/tmux
mv tmux.*AppImage /usr/local/bin/tmux
tmux
```
Expand Down
4 changes: 4 additions & 0 deletions opt/AppRun
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
unset ARGV0
exec "${HERE}/usr/bin/tmux" "$@"
4 changes: 3 additions & 1 deletion opt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ export OUTPUT="/opt/releases/tmux-$RELEASE_TAG-x86_64.AppImage"
/usr/bin/linuxdeploy --appdir=AppDir \
-i /opt/tmux-logo-square.png \
-d /opt/tmux.desktop \
-e MakeBuild/bin/tmux --output=appimage
-e MakeBuild/bin/tmux \
--custom-apprun=/opt/AppRun \
--output=appimage

0 comments on commit c5b1645

Please sign in to comment.