small security changes

This commit is contained in:
2026-05-20 17:31:29 +02:00
parent 38f5a8285c
commit 5c0d0fd521
+10 -7
View File
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail
search_paths=("$HOME/.steam/steam/steamapps/common" "$HOME/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common" "$HOME/.local/share/Steam/steamapps/common" "/mnt" "/")
repository_url="https://api.github.com/repos/LukeYui/EldenRingSeamlessCoopRelease/releases/latest"
@@ -10,9 +11,9 @@ read -p "Do you want to use the official Github-Repository [d] to download the m
if [[ $input == "l" || $input == "L" || $input == "local" || $input == "Local" ]]; then
echo "Searching Downloads folder..."
local_path=$(timeout 5 find $HOME/Downloads -iname Seamless*.zip) || true
local_path=$(timeout 5 find "$HOME/Downloads" -iname Seamless*.zip) || true
if [[ -f "$local_path" && "$local_path" =~ ^.*Seamless.*.zip$ ]]; then
if [[ -f "$local_path" && "$local_path" =~ ^.*Seamless.*\.zip$ ]]; then
echo "File found at $local_path"
else
@@ -27,7 +28,7 @@ if [[ $input == "l" || $input == "L" || $input == "local" || $input == "Local" ]
echo "File found at $local_path"
elif [[ ! -z "$input" ]]; then
local_path=$(timeout 5 find $input -iname Seamless*.zip)
local_path=$(timeout 5 find "$input" -iname Seamless*.zip)
if [[ -f "$local_path" ]]; then
echo "File found at $local_path"
else
@@ -73,6 +74,12 @@ input=""
echo "Creating temp folder"
temp_dir=$(mktemp -d)
cleanup() {
rm -rf "$temp_dir"
}
cd "$temp_dir"
if [[ -z $sc_download_url && -f $local_path ]]; then
@@ -103,10 +110,6 @@ rsync -r --remove-source-files * "$eldenring_dir"
echo "Deleting temp download folder"
cleanup() {
rm -rf "$temp_dir"
}
trap cleanup EXIT
echo "Done"