mirror of
https://github.com/FliegendeWurst/nur-packages.git
synced 2024-11-22 17:05:01 +00:00
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
|
diff --git a/tmux-thumbs.sh b/tmux-thumbs.sh
|
||
|
index 34dd528..8c05d54 100755
|
||
|
--- a/tmux-thumbs.sh
|
||
|
+++ b/tmux-thumbs.sh
|
||
|
@@ -3,19 +3,6 @@
|
||
|
|
||
|
# 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 -o "\".*\"" | sed 's/"//g')
|
||
|
-
|
||
|
-if [ ! -f "$THUMBS_BINARY" ]; then
|
||
|
- tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh"
|
||
|
- exit
|
||
|
-elif [[ $(${THUMBS_BINARY} --version) != "thumbs ${VERSION}" ]]; then
|
||
|
- tmux split-window "cd ${CURRENT_DIR} && bash ./tmux-thumbs-install.sh update"
|
||
|
- exit
|
||
|
-fi
|
||
|
|
||
|
function get-opt-value() {
|
||
|
tmux show -vg "@thumbs-${1}" 2> /dev/null
|
||
|
@@ -35,7 +22,7 @@
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
-PARAMS=(--dir "${CURRENT_DIR}")
|
||
|
+PARAMS=(--dir @tmuxThumbsDir@)
|
||
|
|
||
|
function add-param() {
|
||
|
local type opt arg
|
||
|
@@ -50,4 +37,4 @@
|
||
|
add-param multi-command string
|
||
|
add-param osc52 boolean
|
||
|
|
||
|
-"${TMUX_THUMBS_BINARY}" "${PARAMS[@]}" || true
|
||
|
+@tmuxThumbsDir@/tmux-thumbs "${PARAMS[@]}" || true
|