feat: detect handlers on windows

This commit is contained in:
xeruf 2023-01-18 01:49:12 +01:00
parent a6235ac38c
commit fd7834c3f4
1 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,8 @@ runinstalee() {
# TODO Manjaro
if ! test -f "$handlersfile"
then copy="$(find "$dir_home" -name "handlers.available.*" -exec sh -c "echo {} | rev | cut -d'.' -f1 | rev | xargs -i% expr $(lsb_release -s -i | tr 'A-Z' 'a-z' || cat /etc/os-release | grep '^ID=' | cut -d= -f2) : % >/dev/null" \; -a -print)" &&
then
copy="$(case "$(uname)" in (MINGW64*) echo "$dir_home/handlers.available.windows";; (*) find "$dir_home" -name "handlers.available.*" -exec sh -c "echo {} | rev | cut -d'.' -f1 | rev | xargs -i% expr $(lsb_release -s -i | tr 'A-Z' 'a-z' || cat /etc/os-release | grep '^ID=' | cut -d= -f2) : % >/dev/null" \; -a -print;; esac)" &&
test -n "$copy" &&
echo "Bootstrapping available handlers from $copy" &&
cp "$copy" "$handlersfile" || {