misc: uh what happened here
This commit is contained in:
17
apps/Lutris/preloader.sh
Executable file → Normal file
17
apps/Lutris/preloader.sh
Executable file → Normal file
@ -2,8 +2,10 @@
|
||||
# Lutris pre-loader script, for allowing loading multiple pre-load scripts.
|
||||
|
||||
# Enabling debug will enable the script output.
|
||||
FOLDER="./preloader"
|
||||
DEBUG=1
|
||||
|
||||
# Folder path (relative to Lutris prefix directory)
|
||||
FOLDER="${PRELOADER_PATH:-"./preloader"}"
|
||||
DEBUG="${PRELOADER_DEBUG:-0}"
|
||||
|
||||
execute_file () {
|
||||
# Just in case...
|
||||
@ -11,14 +13,19 @@ execute_file () {
|
||||
if [[ $DEBUG -eq 0 ]]; then
|
||||
nohup "$1" >/dev/null 2>&1 &
|
||||
else
|
||||
# No this is not as smart as you think...
|
||||
filename=$(echo "$1" | cut -d "/" -f3)
|
||||
fullfile="$1"
|
||||
filename="${fullfile##*/}"
|
||||
nohup "$1" > ./logs/"$FOLDER"_"$filename".log 2>&1 &
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $DEBUG -ne 0 ]]; then
|
||||
echo "!!!DEBUGGING ENABLED!!!"
|
||||
echo "Debug log may leak your sensitive information, use with caution."
|
||||
echo "!!!DEBUGGING ENABLED!!!"
|
||||
mkdir -p "$FOLDER" ./logs/
|
||||
fi
|
||||
echo "Checking directory..."
|
||||
mkdir -p "$FOLDER" ./logs/
|
||||
for file in "$FOLDER"/*.*; do
|
||||
[ -e "$file" ] || continue
|
||||
echo "Found $file, loading..."
|
||||
|
||||
Reference in New Issue
Block a user