aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-03-28 04:58:36 +0100
committerPatrick Spek <p.spek@tyil.nl>2020-03-28 04:58:36 +0100
commit347bdffbde23fd4c0fc619f95c2c697a702e3a3f (patch)
tree5489eb62d184879c667043dafa43d0acdaf5c8c7
parentbd1c6a7bcdbe10cb89b623015e7018282a5d7635 (diff)
Please shellcheck
-rw-r--r--lib/main.bash14
-rw-r--r--lib/util.bash2
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/main.bash b/lib/main.bash
index 440cda5..8b399e1 100644
--- a/lib/main.bash
+++ b/lib/main.bash
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
+# shellcheck source=lib/util.bash
source "$(dirname "${BASH_SOURCE[0]}")/util.bash"
+
+# shellcheck source=lib/logging.bash
source "$(dirname "${BASH_SOURCE[0]}")/logging.bash"
main() {
@@ -32,6 +35,12 @@ main() {
debug "Discovering system information"
discover_system
+ # Export RSTAR_ variables
+ export RSTAR_TOOLS
+ export RSTAR_BACKEND
+ export RSTAR_PREFIX
+ export RSTAR_PLATFORM
+
# Source the file defining the action.
debug "Sourcing $action_path"
source "$action_path"
@@ -122,18 +131,21 @@ depcheck_bin() {
then
local packages
local pacman_cmd
+ local package
debug "bindep_db found"
# Create a list of packages that needs to be installed
for tool in "${missing[@]}"
do
- local package="$(config_etc_kv "$bindep_db" "$tool")"
+ package="$(config_etc_kv "$bindep_db" "$tool")"
# Don't add duplicates
in_args "$package" "${packages[@]}" && continue
packages+=("$package")
+
+ unset package
done
# Figure out which package manager command install on
diff --git a/lib/util.bash b/lib/util.bash
index eb7c9a8..92ff1bc 100644
--- a/lib/util.bash
+++ b/lib/util.bash
@@ -101,7 +101,7 @@ in_args() {
for arg in "$@"
do
- [[ $needle == $arg ]] && return 0
+ [[ $needle == "$arg" ]] && return 0
done
return 1