diff --git a/bash/main.sh b/bash/main.sh index c12cdf8..5237bd3 100644 --- a/bash/main.sh +++ b/bash/main.sh @@ -2,7 +2,9 @@ MAIN_USERS_FILE="$(realpath --canonicalize-existing "${BASH_SOURCE[0]}")" -MAIN_USERS_ROOT="$(dirname "${MAIN_USERS_FILE}")" +main_get_root() { + dirname "${MAIN_USERS_FILE}" +} main_link_bashrc() { local file="/etc/bash.bashrc" diff --git a/bash/rescue.sh b/bash/rescue.sh index e7ff374..0d14bbd 100644 --- a/bash/rescue.sh +++ b/bash/rescue.sh @@ -85,7 +85,7 @@ rescue_upload() { "${user_host}" # upload root rsync --delete --recursive \ - "${MAIN_USERS_ROOT}/" "${user_host}:/etc/bash/" + "$(main_get_root)/" "${user_host}:/etc/bash/" # call setup # TODO variable ssh "${user_host}" -- "\