From 672b385447efb5b39f7fcaa4b4a5fbfa963706f7 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 15 Nov 2024 16:26:54 +0100 Subject: [PATCH] wip/env --- bash/main.sh | 10 +++------- bash/rescue/common.sh | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bash/main.sh b/bash/main.sh index c692412..ff56a3c 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -1,9 +1,5 @@ -#! /usr/bin/env bash - -MAIN_USERS_FILE="$(realpath --canonicalize-existing "${BASH_SOURCE[0]}")" - -main_get_root() { - dirname "${MAIN_USERS_FILE}" +main_env_root() { + dirname "${ENV}" } main_link_bashrc() { @@ -45,4 +41,4 @@ main_import_modules() { } # import modules -main_import_modules "${MAIN_USERS_FILE}" +main_import_modules "${ENV}" diff --git a/bash/rescue/common.sh b/bash/rescue/common.sh index 0d14bbd..3671d15 100644 --- a/bash/rescue/common.sh +++ b/bash/rescue/common.sh @@ -85,7 +85,7 @@ rescue_upload() { "${user_host}" # upload root rsync --delete --recursive \ - "$(main_get_root)/" "${user_host}:/etc/bash/" + "$(main_env_root)" "${user_host}:/etc" # call setup # TODO variable ssh "${user_host}" -- "\