Update tmux-thumbs.sh

Fix an issue with current dir
This commit is contained in:
Ferran Basora 2022-02-02 23:09:02 +01:00 committed by GitHub
parent 1b553f636b
commit 3033226513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,14 +1,13 @@
#!/usr/bin/env bash
set -Eeu -o pipefail
VERSION=$(grep 'version =' Cargo.toml | grep -oe "[0-9]\+.[0-9]\+.[0-9]\+")
# Setup env variables to be compatible with compiled and bundled installations
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
RELEASE_DIR="${CURRENT_DIR}/target/release"
THUMBS_BINARY="${RELEASE_DIR}/thumbs"
TMUX_THUMBS_BINARY="${RELEASE_DIR}/tmux-thumbs"
VERSION=$(grep 'version =' "${CURRENT_DIR}/Cargo.toml" | grep -oe "[0-9]\+.[0-9]\+.[0-9]\+")
if [ ! -f "$THUMBS_BINARY" ]; then
tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh"