aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-06-30 15:25:41 +0200
committerPatrick Spek <p.spek@tyil.nl>2020-11-20 20:42:31 +0100
commitebdb97aeebe53ce0912012dd181d143c3d33cfa4 (patch)
tree30075150d9217f012851eb93af85ded98d076d18 /lib
parentfd9c7573c4d01d629c0068ab71ddb4a418d6bb1d (diff)
Discover system arch in a subshell
Diffstat (limited to 'lib')
-rw-r--r--lib/main.bash7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/main.bash b/lib/main.bash
index 8ee72dd..67d05c7 100644
--- a/lib/main.bash
+++ b/lib/main.bash
@@ -230,7 +230,12 @@ discover_system_arch() {
discover_system_distro() {
if [[ -f /etc/os-release ]]
then
- printf "%s" "$(source /etc/os-release && printf "%s" "$NAME" | awk '{print tolower($0)}' | sed 's@[/+ ]@_@g')"
+ (
+ source /etc/os-release
+ printf "%s" "$NAME" \
+ | awk '{print tolower($0)}' \
+ | sed 's@[/+ ]@_@g'
+ )
return
fi