summarylogtreecommitdiffstats
path: root/nautilus-fix.sh
blob: db0c06203e04fadd2116aa255a031489641f8073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# ==============================================================================
# Hytale Launcher Wrapper for Arch Linux
#
# Author:      [SCDevel/root@scdevel.net]
# License:     MIT
# Description: Temporary fix for nautilus crash due to hardcoded requirement of nautilus
#
# Disclaimer:  This script is an unofficial community tool and is not
#              affiliated with, endorsed by, or owned by Hypixel Studios Canada.
# ==============================================================================

TARGET=""

for arg in "$@"; do
    [[ "$arg" == -* ]] && continue
    TARGET="$arg"
done


if [[ -z "$TARGET" ]]; then
    echo "ERROR: Unable to open file/folder."
    exit 1
fi

# xdg-open should be included with xdg-utils.
exec xdg-open "$TARGET" & disown

exit 0