mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-12-30 11:41:50 +01:00
Added Some logic to help the decky plugin
This commit is contained in:
parent
601a7dfe1a
commit
14f0dbe079
@ -43,8 +43,19 @@ check_for_updates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Get the command line arguments
|
||||||
|
args=("$@")
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
# Rough way to "update" the .py for users that already had the service file
|
# Rough way to "update" the .py for users that already had the service file
|
||||||
# Define the repository and the folders to clone
|
# Define the repository and the folders to clone
|
||||||
repo_url='https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck/archive/refs/heads/main.zip'
|
repo_url='https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck/archive/refs/heads/main.zip'
|
||||||
@ -109,6 +120,26 @@ curl -o $python_script_path $github_link
|
|||||||
env_vars="${logged_in_home}/.config/systemd/user/env_vars"
|
env_vars="${logged_in_home}/.config/systemd/user/env_vars"
|
||||||
|
|
||||||
|
|
||||||
|
# Check if the env_vars file exists and the decky_plugin argument is set
|
||||||
|
if [ -f "$env_vars" ] && [ "$decky_plugin" = true ]; then
|
||||||
|
# If the file exists and the decky_plugin argument is set, run the .py file
|
||||||
|
echo "env_vars file found and Decky Plugin argument set. Running the .py file..."
|
||||||
|
python3 $python_script_path
|
||||||
|
live="and is LIVE."
|
||||||
|
# Exit the script after running the .py file
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
# If the file does not exist or the decky_plugin argument is not set, do not run the .py file
|
||||||
|
echo "env_vars file not found or Decky Plugin argument not set. Not running the .py file."
|
||||||
|
live="and is NOT LIVE."
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Check if the env_vars file exists
|
# Check if the env_vars file exists
|
||||||
if [ -f "$env_vars" ]; then
|
if [ -f "$env_vars" ]; then
|
||||||
# If the file exists, run the .py file
|
# If the file exists, run the .py file
|
||||||
@ -124,8 +155,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Get the command line arguments
|
|
||||||
args=("$@")
|
|
||||||
|
|
||||||
# Check if any command line arguments were provided
|
# Check if any command line arguments were provided
|
||||||
if [ ${#args[@]} -eq 0 ]; then
|
if [ ${#args[@]} -eq 0 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user