Merge branch 'main' into dependabot/pip/pytest-8.0.2

This commit is contained in:
Roy 2024-03-06 01:42:46 -08:00 committed by GitHub
commit 5fce5b7b61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 144 additions and 136 deletions

View File

@ -51,28 +51,35 @@ 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
for arg in "${args[@]}"; do
if [ "$arg" = "NoPython" ]; then
nopython=true
break
fi
done
if [ "${folders_exist}" = false ]; then
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}"
@ -92,57 +99,57 @@ if [ "${folders_exist}" = false ]; then
# 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
fi
#End of Download Modules
#Service File rough update
rm -rf ${logged_in_home}/.config/systemd/user/NSLGameScanner.py
#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
# 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
# Remove the symlink
unlink ${logged_in_home}/.config/systemd/user/default.target.wants/nslgamescanner.service
# Reload the systemd user instance
systemctl --user daemon-reload
# 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 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 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
# 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
if [ -f "$env_vars" ]; then
echo "env_vars file found. Running the .py file."
live="and is LIVE."
else
else
echo "env_vars file not found. Not Running the .py file."
live="and is not LIVE."
fi
fi
# Check if "Decky Plugin" is one of the arguments
decky_plugin=false
for arg in "${args[@]}"; do
# 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
done
# If the Decky Plugin argument is set, check if the env_vars file exists
if [ "$decky_plugin" = true ]; then
# 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..."
@ -153,12 +160,13 @@ if [ "$decky_plugin" = true ]; then
echo "Decky Plugin argument set but env_vars file not found. Exiting the script."
exit 0
fi
else
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
@ -166,7 +174,6 @@ fi
# Check if any command line arguments were provided
if [ ${#args[@]} -eq 0 ]; then
# No command line arguments were provided, so check for updates and display the zenity window if necessary
@ -2757,31 +2764,31 @@ fi
if ["$nopython" = false]; then
#Setup NSLGameScanner.service
python_script_path="${logged_in_home}/.config/systemd/user/NSLGameScanner.py"
#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"
# 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)
# Check if the service is already running
service_status=$(systemctl --user is-active nslgamescanner.service)
if [ "$service_status" = "active" ] || [ "$service_status" = "activating" ]
then
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
View File

@ -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"