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}" -- "\