fix: improve discovery of home directory

This commit is contained in:
xeruf 2022-12-02 11:24:22 +01:00
parent 07da169c5e
commit 410e51ddd4
2 changed files with 3 additions and 2 deletions

View file

@ -147,6 +147,7 @@ and ideas that need to be fleshed out.
- Handler preparation - update repos and cache last update time in /tmp
- Run file in tempdir by default?
- Handler for downloaded scripts (e.g. passff-host, funkwhale)
- Enable services after install, e.g. syncthing and docker
#### Windows Flow
- Install choco and git offline

View file

@ -3,8 +3,8 @@
## DEFINITIONS
name="$(basename "$0")"
self="$(realpath "$0")"
handlersfile="$(find "$INSTALEE_HOME" "${XDG_CONFIG_HOME:-$HOME/.config}/$name" "$HOME/.$name" "$(realpath "$(dirname "$0")")" "$PWD" -maxdepth 1 -name "handlers.available*" 2>/dev/null | head -1)"
export dir_home="$(dirname "$handlersfile")"
export dir_home="$(dirname $(find "$INSTALEE_HOME" "${XDG_CONFIG_HOME:-$HOME/.config}/$name" "$HOME/.$name" "$(realpath "$(dirname "$0")")" "$PWD" -maxdepth 1 -name "handlers.available*" 2>/dev/null | head -1))"
handlersfile="$dir_home/handlers.available"
dir_packages="$dir_home/packages"
highlight() { echo "$1" >&2; }