From ee5c34de4a141f7282a2ae4e1940b122579d1bea Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 4 Nov 2020 14:05:09 +0800 Subject: [PATCH] [bugfix] parent dir path --- apps/docker.sh | 2 +- deeplearning/install.sh | 2 +- env.sh | 6 +++--- fish/install.sh | 2 +- nvim/install.sh | 4 ++-- picom/install.sh | 2 +- ranger/install.sh | 2 +- suckless/install.sh | 8 ++++---- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/docker.sh b/apps/docker.sh index 461b28c..c5101b8 100755 --- a/apps/docker.sh +++ b/apps/docker.sh @@ -10,7 +10,7 @@ case "$PM" in # snap docker will intefere native docker.io, must be dealt with sudo snap remove --purge docker sudo apt install -y docker.io docker-compose - ! command -v pip3 && "$ROOT/python/install.sh" + ! command -v pip3 && "$PDIR/python/install.sh" sudo pip3 install docker-compose ;; pacman) diff --git a/deeplearning/install.sh b/deeplearning/install.sh index 9dae283..1783032 100755 --- a/deeplearning/install.sh +++ b/deeplearning/install.sh @@ -4,7 +4,7 @@ DIR=$(readlink -f "$(dirname "$0")") . "$DIR/../env.sh" -"$ROOT/python/install.sh" +"$PDIR/python/install.sh" # install deep learning tools case "$PM" in diff --git a/env.sh b/env.sh index 7024408..b942120 100755 --- a/env.sh +++ b/env.sh @@ -1,10 +1,10 @@ #!/bin/sh -set -e -ROOT=$(readlink -f "$(dirname "$0")") PM=n/a XDG_CONFIG_HOME=${XDG_CONFIG_HOME-"$HOME/.config"} -echo "dotfiles path: $ROOT" +PDIR=$(dirname $DIR) +echo "dir: $DIR" +echo "parent dir: $PDIR" if command -v pacman > /dev/null; then PM=pacman diff --git a/fish/install.sh b/fish/install.sh index 441de71..47fa9f8 100755 --- a/fish/install.sh +++ b/fish/install.sh @@ -7,7 +7,7 @@ DIR=$(readlink -f "$(dirname "$0")") echo Installing fish shell case "$PM" in apt) - ! command -v pip3 && "$ROOT/python/install.sh" + ! command -v pip3 && "$PDIR/python/install.sh" sudo add-apt-repository ppa:fish-shell/release-3 -y sudo apt update sudo apt install fish libnotify-bin xdotool silversearcher-ag dash -y diff --git a/nvim/install.sh b/nvim/install.sh index 0895143..b90b5e6 100755 --- a/nvim/install.sh +++ b/nvim/install.sh @@ -4,8 +4,8 @@ DIR=$(readlink -f "$(dirname "$0")") . "$DIR/../env.sh" # check dependencies -! command -v yarnpkg && "$ROOT/nodejs/install.sh" -! command -v pip && "$ROOT/python/install.sh" +! command -v yarnpkg && "$PDIR/nodejs/install.sh" +! command -v pip && "$PDIR/python/install.sh" # install nvim case "$PM" in diff --git a/picom/install.sh b/picom/install.sh index 1b2881a..74834eb 100755 --- a/picom/install.sh +++ b/picom/install.sh @@ -9,7 +9,7 @@ DIR=$(readlink -f "$(dirname "$0")") case "$PM" in apt) # install build tools - ! command -v pip3 && "$ROOT/python/install.sh" + ! command -v pip3 && "$PDIR/python/install.sh" sudo pip3 install meson # install dependencies sudo apt install -y ninja-build libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl1-mesa-dev libpcre3-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev diff --git a/ranger/install.sh b/ranger/install.sh index 9fafd8a..45fc3d6 100755 --- a/ranger/install.sh +++ b/ranger/install.sh @@ -9,7 +9,7 @@ case "$PM" in apt) # atool/p7zip-full for archive previewing/extracting etc sudo apt install -y atool p7zip-full unrar highlight - ! command -v pip3 && "$ROOT/python/install.sh" + ! command -v pip3 && "$PDIR/python/install.sh" sudo pip3 install ranger-fm ueberzug ;; pacman) diff --git a/suckless/install.sh b/suckless/install.sh index 2672272..4694a26 100755 --- a/suckless/install.sh +++ b/suckless/install.sh @@ -3,10 +3,10 @@ DIR=$(readlink -f "$(dirname "$0")") . "$DIR/../env.sh" -"$ROOT/fish/install.sh" -"$ROOT/gui/install.sh" -"$ROOT/picom/install.sh" -"$ROOT/dunst/install.sh" +"$PDIR/fish/install.sh" +"$PDIR/gui/install.sh" +"$PDIR/picom/install.sh" +"$PDIR/dunst/install.sh" # install dependencies case "$PM" in