mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-21 15:21:52 +01:00
Merge branch 'main' into dependabot/pip/pytest-8.0.2
This commit is contained in:
commit
5fce5b7b61
@ -51,116 +51,123 @@ check_for_updates() {
|
||||
# Get the command line arguments
|
||||
args=("$@")
|
||||
|
||||
|
||||
|
||||
#Download Modules
|
||||
# Define the repository and the folders to clone
|
||||
repo_url='https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck/archive/refs/heads/main.zip'
|
||||
folders_to_clone=('requests' 'urllib3' 'steamgrid' 'vdf')
|
||||
|
||||
# Define the parent folder
|
||||
logged_in_home=$(eval echo ~$user)
|
||||
parent_folder="${logged_in_home}/.config/systemd/user/Modules"
|
||||
mkdir -p "${parent_folder}"
|
||||
|
||||
# Check if the folders already exist
|
||||
folders_exist=true
|
||||
for folder in "${folders_to_clone[@]}"; do
|
||||
if [ ! -d "${parent_folder}/${folder}" ]; then
|
||||
folders_exist=false
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${folders_exist}" = false ]; then
|
||||
# Download the repository as a zip file
|
||||
zip_file_path="${parent_folder}/repo.zip"
|
||||
wget -O "${zip_file_path}" "${repo_url}"
|
||||
|
||||
# Extract the zip file
|
||||
unzip -d "${parent_folder}" "${zip_file_path}"
|
||||
|
||||
# Move the folders to the parent directory and delete the unnecessary files
|
||||
for folder in "${folders_to_clone[@]}"; do
|
||||
destination_path="${parent_folder}/${folder}"
|
||||
source_path="${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main/Modules/${folder}"
|
||||
if [ ! -d "${destination_path}" ]; then
|
||||
mv "${source_path}" "${destination_path}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Delete the downloaded zip file and the extracted repository folder
|
||||
rm "${zip_file_path}"
|
||||
rm -r "${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main"
|
||||
fi
|
||||
#End of Download Modules
|
||||
|
||||
|
||||
#Service File rough update
|
||||
rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py
|
||||
|
||||
# Delete the service file
|
||||
rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service
|
||||
|
||||
# Remove the symlink
|
||||
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
|
||||
|
||||
# Reload the systemd user instance
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Define your Python script path
|
||||
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
||||
|
||||
# Define your GitHub link
|
||||
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
||||
curl -o $python_script_path $github_link
|
||||
|
||||
# Define the path to the env_vars file
|
||||
env_vars="${logged_in_home}/.config/systemd/user/env_vars"
|
||||
#End of Rough Update of the .py
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -f "$env_vars" ]; then
|
||||
echo "env_vars file found. Running the .py file."
|
||||
live="and is LIVE."
|
||||
else
|
||||
echo "env_vars file not found. Not Running the .py file."
|
||||
live="and is not LIVE."
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check if "Decky Plugin" is one of the arguments
|
||||
decky_plugin=false
|
||||
for arg in "${args[@]}"; do
|
||||
if [ "$arg" = "Decky Plugin" ]; then
|
||||
decky_plugin=true
|
||||
break
|
||||
fi
|
||||
if [ "$arg" = "NoPython" ]; then
|
||||
nopython=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# If the Decky Plugin argument is set, check if the env_vars file exists
|
||||
if [ "$decky_plugin" = true ]; then
|
||||
if [ -f "$env_vars" ]; then
|
||||
# If the env_vars file exists, run the .py file and continue with the script
|
||||
echo "Decky Plugin argument set and env_vars file found. Running the .py file..."
|
||||
python3 $python_script_path
|
||||
echo "Python script ran. Continuing with the script..."
|
||||
else
|
||||
# If the env_vars file does not exist, exit the script
|
||||
echo "Decky Plugin argument set but env_vars file not found. Exiting the script."
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# If the Decky Plugin argument is not set, continue with the script
|
||||
echo "Decky Plugin argument not set. Continuing with the script..."
|
||||
python3 $python_script_path
|
||||
echo "env_vars file found. Running the .py file."
|
||||
live="and is LIVE."
|
||||
fi
|
||||
if ["$nopython" = false]; then
|
||||
|
||||
#Download Modules
|
||||
# Define the repository and the folders to clone
|
||||
repo_url='https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck/archive/refs/heads/main.zip'
|
||||
folders_to_clone=('requests' 'urllib3' 'steamgrid' 'vdf')
|
||||
|
||||
# Define the parent folder
|
||||
logged_in_home=$(eval echo ~$user)
|
||||
parent_folder="${logged_in_home}/.config/systemd/user/Modules"
|
||||
mkdir -p "${parent_folder}"
|
||||
|
||||
# Check if the folders already exist
|
||||
folders_exist=true
|
||||
for folder in "${folders_to_clone[@]}"; do
|
||||
if [ ! -d "${parent_folder}/${folder}" ]; then
|
||||
folders_exist=false
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "${folders_exist}" = false ]; then
|
||||
# Download the repository as a zip file
|
||||
zip_file_path="${parent_folder}/repo.zip"
|
||||
wget -O "${zip_file_path}" "${repo_url}"
|
||||
|
||||
# Extract the zip file
|
||||
unzip -d "${parent_folder}" "${zip_file_path}"
|
||||
|
||||
# Move the folders to the parent directory and delete the unnecessary files
|
||||
for folder in "${folders_to_clone[@]}"; do
|
||||
destination_path="${parent_folder}/${folder}"
|
||||
source_path="${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main/Modules/${folder}"
|
||||
if [ ! -d "${destination_path}" ]; then
|
||||
mv "${source_path}" "${destination_path}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Delete the downloaded zip file and the extracted repository folder
|
||||
rm "${zip_file_path}"
|
||||
rm -r "${parent_folder}/NonSteamLaunchers-On-Steam-Deck-main"
|
||||
fi
|
||||
#End of Download Modules
|
||||
|
||||
|
||||
#Service File rough update
|
||||
rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py
|
||||
|
||||
# Delete the service file
|
||||
rm -rf ${logged_in_home}/.config/systemd/user/nslgamescanner.service
|
||||
|
||||
# Remove the symlink
|
||||
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
|
||||
|
||||
# Reload the systemd user instance
|
||||
systemctl --user daemon-reload
|
||||
|
||||
# Define your Python script path
|
||||
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
||||
|
||||
# Define your GitHub link
|
||||
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
||||
curl -o $python_script_path $github_link
|
||||
|
||||
# Define the path to the env_vars file
|
||||
env_vars="${logged_in_home}/.config/systemd/user/env_vars"
|
||||
#End of Rough Update of the .py
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -f "$env_vars" ]; then
|
||||
echo "env_vars file found. Running the .py file."
|
||||
live="and is LIVE."
|
||||
else
|
||||
echo "env_vars file not found. Not Running the .py file."
|
||||
live="and is not LIVE."
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check if "Decky Plugin" is one of the arguments
|
||||
decky_plugin=false
|
||||
for arg in "${args[@]}"; do
|
||||
if [ "$arg" = "Decky Plugin" ]; then
|
||||
decky_plugin=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# If the Decky Plugin argument is set, check if the env_vars file exists
|
||||
if [ "$decky_plugin" = true ]; then
|
||||
if [ -f "$env_vars" ]; then
|
||||
# If the env_vars file exists, run the .py file and continue with the script
|
||||
echo "Decky Plugin argument set and env_vars file found. Running the .py file..."
|
||||
python3 $python_script_path
|
||||
echo "Python script ran. Continuing with the script..."
|
||||
else
|
||||
# If the env_vars file does not exist, exit the script
|
||||
echo "Decky Plugin argument set but env_vars file not found. Exiting the script."
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
# If the Decky Plugin argument is not set, continue with the script
|
||||
echo "Decky Plugin argument not set. Continuing with the script..."
|
||||
python3 $python_script_path
|
||||
echo "env_vars file found. Running the .py file."
|
||||
live="and is LIVE."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -2757,31 +2764,31 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
#Setup NSLGameScanner.service
|
||||
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
||||
|
||||
# Define your GitHub link
|
||||
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
||||
|
||||
# Check if the service is already running
|
||||
service_status=$(systemctl --user is-active nslgamescanner.service)
|
||||
|
||||
if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ]
|
||||
then
|
||||
echo "Service is already running or activating. Stopping the service..."
|
||||
systemctl --user stop nslgamescanner.service
|
||||
if ["$nopython" = false]; then
|
||||
#Setup NSLGameScanner.service
|
||||
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
|
||||
|
||||
# Define your GitHub link
|
||||
github_link="https://raw.githubusercontent.com/moraroy/NonSteamLaunchers-On-Steam-Deck/main/NSLGameScanner.py"
|
||||
|
||||
# Check if the service is already running
|
||||
service_status=$(systemctl --user is-active nslgamescanner.service)
|
||||
|
||||
if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ]
|
||||
then
|
||||
echo "Service is already running or activating. Stopping the service..."
|
||||
systemctl --user stop nslgamescanner.service
|
||||
fi
|
||||
|
||||
echo "Updating Python script from GitHub..."
|
||||
|
||||
curl -o $python_script_path $github_link
|
||||
|
||||
echo "Starting the service..."
|
||||
|
||||
python3 $python_script_path
|
||||
fi
|
||||
|
||||
echo "Updating Python script from GitHub..."
|
||||
|
||||
curl -o $python_script_path $github_link
|
||||
|
||||
echo "Starting the service..."
|
||||
|
||||
python3 $python_script_path
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
15
poetry.lock
generated
15
poetry.lock
generated
@ -636,13 +636,13 @@ typing = ["typing-extensions (>=4.8)"]
|
||||
|
||||
[[package]]
|
||||
name = "hypothesis"
|
||||
version = "6.98.11"
|
||||
version = "6.98.15"
|
||||
description = "A library for property-based testing"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "hypothesis-6.98.11-py3-none-any.whl", hash = "sha256:3ec000228b0a5367255dd79a5d0ed6d9b2f395b24cf6ae334c5f4837c1380f73"},
|
||||
{file = "hypothesis-6.98.11.tar.gz", hash = "sha256:64d4615574ab8346a2352c595f1438adb225904df2101adbdd17e0e3d817df1c"},
|
||||
{file = "hypothesis-6.98.15-py3-none-any.whl", hash = "sha256:5b40fd81fce9e0b35f0a47e10eb41f375a6b9e8551d0e1084c83b8b0d0d1bb6b"},
|
||||
{file = "hypothesis-6.98.15.tar.gz", hash = "sha256:1e31210951511b24ce8b3b6e04d791c466385a30ac3af571bf2223954b025d77"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@ -1479,13 +1479,13 @@ requests = ">=2.0.1,<3.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "rich"
|
||||
version = "13.7.0"
|
||||
version = "13.7.1"
|
||||
description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal"
|
||||
optional = false
|
||||
python-versions = ">=3.7.0"
|
||||
files = [
|
||||
{file = "rich-13.7.0-py3-none-any.whl", hash = "sha256:6da14c108c4866ee9520bbffa71f6fe3962e193b7da68720583850cd4548e235"},
|
||||
{file = "rich-13.7.0.tar.gz", hash = "sha256:5cb5123b5cf9ee70584244246816e9114227e0b98ad9176eede6ad54bf5403fa"},
|
||||
{file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"},
|
||||
{file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@ -1786,4 +1786,5 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.11,<3.13"
|
||||
content-hash = "5c85dfc58854912b0e26a1748146508da4ad31c4e37e71881f4d0a453e15fb81"
|
||||
content-hash = "965313bfe930c7e75609859087048154b4b32d7222837a8fe0f8a79cc10236a4"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user