diff --git a/bootstrap.bash b/bootstrap.bash index 503edea..56ac6e2 100644 --- a/bootstrap.bash +++ b/bootstrap.bash @@ -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" diff --git a/config.bash b/config.bash index eafada3..6e78de1 100644 --- a/config.bash +++ b/config.bash @@ -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 diff --git a/fonts.bash b/fonts.bash index 3fe444e..35d1d47 100644 --- a/fonts.bash +++ b/fonts.bash @@ -1,6 +1,6 @@ # FONTS -fontdir="$HOME/.local/share/fonts" +fontdir="${HOME}/.local/share/fonts" declare -a fonts fonts+=("Inconsolata") diff --git a/os.bash b/os.bash index a3e4265..b93d578 100644 --- a/os.bash +++ b/os.bash @@ -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 diff --git a/tools.bash b/tools.bash index 172e3fa..12357e6 100644 --- a/tools.bash +++ b/tools.bash @@ -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