[misc] posix-compliant

This commit is contained in:
Klesh Wong 2020-11-08 14:05:21 +08:00
parent fad8d67708
commit 0babfea7e4
2 changed files with 3 additions and 2 deletions

3
env.sh
View File

@ -1,8 +1,9 @@
#!/bin/sh
set -e
PM=n/a
XDG_CONFIG_HOME=${XDG_CONFIG_HOME-"$HOME/.config"}
PDIR=$(dirname $DIR)
PDIR=$(dirname "${DIR-$0}")
echo "dir: $DIR"
echo "parent dir: $PDIR"

View File

@ -9,7 +9,7 @@ TMUX_VER=3.1b
# install ranger
case "$PM" in
apt)
if command -v tmux &>/dev/null && [ "$(tmux -V)" != "tmux $TMUX_VER" ]; then
if command -v tmux 2>/dev/null && [ "$(tmux -V)" != "tmux $TMUX_VER" ]; then
sudo apt install libevent-dev libncurses5-dev bison autoconf bc -y
TMUX_SRC_URL=https://github.com/tmux/tmux/releases/download/$TMUX_VER/tmux-$TMUX_VER.tar.gz
if in_china; then