main_get_root

This commit is contained in:
Marc Beninca 2024-11-13 12:03:00 +01:00
parent 28330ca3c8
commit f332104d12
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 4 additions and 2 deletions

View file

@ -2,7 +2,9 @@
MAIN_USERS_FILE="$(realpath --canonicalize-existing "${BASH_SOURCE[0]}")" 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() { main_link_bashrc() {
local file="/etc/bash.bashrc" local file="/etc/bash.bashrc"

View file

@ -85,7 +85,7 @@ rescue_upload() {
"${user_host}" "${user_host}"
# upload root # upload root
rsync --delete --recursive \ rsync --delete --recursive \
"${MAIN_USERS_ROOT}/" "${user_host}:/etc/bash/" "$(main_get_root)/" "${user_host}:/etc/bash/"
# call setup # call setup
# TODO variable # TODO variable
ssh "${user_host}" -- "\ ssh "${user_host}" -- "\