diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c060764 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/gitmux +/gitmux.conf diff --git a/tmux-gitmux.tmux b/tmux-gitmux.tmux new file mode 100755 index 0000000..288df90 --- /dev/null +++ b/tmux-gitmux.tmux @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +BINARY="$CURRENT_DIR/gitmux" +CONFIG="$CURRENT_DIR/gitmux.conf" + +if [ ! -f "$BINARY" ]; then + tmux split-window "cd $CURRENT_DIR && go build -o gitmux && echo 'Press any key to continue...' && read -k1" +fi + +if [ ! -f "$CONFIG" ]; then + ( cd "$CURRENT_DIR" ; ./gitmux -printcfg > gitmux.conf ) +fi