From a97c00ab2c9863ec9058af930a1674e8fb87295d Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 19 Sep 2022 11:23:35 +0100 Subject: [PATCH] Check uname to decide which inventory to use --- console.sh | 10 ++++++++-- desktop.sh | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/console.sh b/console.sh index 1764777..702dedd 100755 --- a/console.sh +++ b/console.sh @@ -1,3 +1,9 @@ #!/bin/sh -. ./roles/home-cli/files/bash_profile -./user-cli.yml -i ./local.ini +. ./roles/home-cli/files/profile +if [ $(uname -s) = FreeBSD ] +then + INVENTORY=./inventories/local-freebsd.ini +else + INVENTORY=./inventories/local-linux.ini +fi +./user-cli.yml -i $INVENTORY diff --git a/desktop.sh b/desktop.sh index f5806dc..f2a9205 100755 --- a/desktop.sh +++ b/desktop.sh @@ -1,3 +1,9 @@ #!/bin/sh -. ./roles/home-cli/files/bash_profile -./user-gui.yml -i ./local.ini +. ./roles/home-cli/files/profile +if [ $(uname -s) = FreeBSD ] +then + INVENTORY=./inventories/local-freebsd.ini +else + INVENTORY=./inventories/local-linux.ini +fi +./user-gui.yml -i $INVENTORY