Make scripts less path dependent

This commit is contained in:
exu 2023-11-17 18:19:47 +01:00
parent b5ad53b028
commit 92b9493807
2 changed files with 6 additions and 2 deletions

View File

@ -49,6 +49,9 @@ cat <<EOF
######################################## ########################################
EOF EOF
# get script directory
scriptloc="$BASH_SOURCE"
# change to home # change to home
cd "$HOME" cd "$HOME"
@ -62,7 +65,7 @@ git clone https://gitea.exu.li/realstickman/configs.git &>/dev/null
# check if the install scripts are the same # check if the install scripts are the same
# NOTE Arguments get passed automatically now # NOTE Arguments get passed automatically now
if ! cmp --silent "$HOME/scripts/arch-config.sh" "$HOME/configs/arch-config/scripts/arch-config.sh"; then if ! cmp --silent "$scriptloc" "$HOME/configs/arch-config/scripts/arch-config.sh"; then
echo Removed old config file and launched new one. echo Removed old config file and launched new one.
rm "$HOME/scripts/arch-config.sh" && cp "$HOME/configs/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@" rm "$HOME/scripts/arch-config.sh" && cp "$HOME/configs/arch-config/scripts/arch-config.sh" "$HOME/scripts/" && bash ~/scripts/arch-config.sh "$@"
fi fi

View File

@ -408,7 +408,8 @@ fi
fc-cache -f fc-cache -f
echo Setting config echo Setting config
bash ~/configs/arch-config/install.sh # FIXME not found
bash "$setupdir/../arch-config/install.sh"
if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then if [[ $(pacman -Q pkgstats 2>/dev/null >/dev/null) ]]; then
pkgstats pkgstats