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 - Handler preparation - update repos and cache last update time in /tmp
- Run file in tempdir by default? - Run file in tempdir by default?
- Handler for downloaded scripts (e.g. passff-host, funkwhale) - Handler for downloaded scripts (e.g. passff-host, funkwhale)
- Enable services after install, e.g. syncthing and docker
#### Windows Flow #### Windows Flow
- Install choco and git offline - Install choco and git offline

View file

@ -3,8 +3,8 @@
## DEFINITIONS ## DEFINITIONS
name="$(basename "$0")" name="$(basename "$0")"
self="$(realpath "$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 $(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")" handlersfile="$dir_home/handlers.available"
dir_packages="$dir_home/packages" dir_packages="$dir_home/packages"
highlight() { echo "$1" >&2; } highlight() { echo "$1" >&2; }