feat: Allow to run script from outside ~/.bootstrap directory

This commit is contained in:
Xavier Logerais 2025-01-25 19:05:28 +01:00
parent 575f7c5e6f
commit ed63fce4c0
5 changed files with 19 additions and 14 deletions

View File

@ -1,6 +1,8 @@
#!/bin/bash
bash os.bash
bash tools.bash
bash fonts.bash
bash config.bash
BASEDIR=$(cd "$(dirname "$0")" && pwd)
bash "${BASEDIR}/os.bash"
bash "${BASEDIR}/tools.bash"
bash "${BASEDIR}/fonts.bash"
bash "${BASEDIR}/config.bash"

View File

@ -1,7 +1,7 @@
#!/bin/bash
for file in config.d/*.bash
do
bash $file
done
BASEDIR=$(cd "$(dirname "$0")" && pwd)
for file in "${BASEDIR}"/config.d/*.bash; do
bash "${file}"
done

View File

@ -1,6 +1,6 @@
# FONTS
fontdir="$HOME/.local/share/fonts"
fontdir="${HOME}/.local/share/fonts"
declare -a fonts
fonts+=("Inconsolata")

View File

@ -1,5 +1,7 @@
#!/bin/bash
for file in os.d/*.bash; do
bash $file
BASEDIR=$(cd "$(dirname "$0")" && pwd)
for file in "${BASEDIR}"/os.d/*.bash; do
bash "${file}"
done

View File

@ -1,6 +1,7 @@
#!/bin/bash
for file in tools.d/*.bash
do
bash $file
BASEDIR=$(cd "$(dirname "$0")" && pwd)
for file in "${BASEDIR}"/tools.d/*.bash; do
bash "${file}"
done