This commit is contained in:
Marc Beninca 2024-11-15 16:26:54 +01:00
parent 05710e7ef7
commit 672b385447
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 4 additions and 8 deletions

View file

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

View file

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