From 6ac114a9758c056a7ca463a1b981ce0955ccb3a3 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 19 Jan 2021 00:43:37 -0500 Subject: [PATCH] Find distro in provision_linux --- provision_linux | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/provision_linux b/provision_linux index 52d5e9e..8b607c7 100755 --- a/provision_linux +++ b/provision_linux @@ -3,12 +3,16 @@ ### Config ### set -g cmd_func_prefix 'provision' +set -g distro -if test -z "$distro" - set -g distro 'arch' +for line in (cat /etc/os-release) + set -l items (string split --max 1 '=' $line) + + if test $items[1] = 'ID' + set distro $items[2] + end end - ### Commands ### # Add, edit, and remove commands freely below. # To add a command simply create a function with this naming scheme: {run_func_prefix}_{name}.