mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2024-11-20 08:09:18 +01:00
added sd card command for plugin
This commit is contained in:
parent
6f567e1049
commit
aeebd08f45
@ -812,6 +812,18 @@ move_to_sd() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if the first command line argument is "Move to SD Card"
|
||||
if [[ $1 == "Move to SD Card" ]]; then
|
||||
# Shift the arguments to remove the first one
|
||||
shift
|
||||
|
||||
# Use the remaining arguments as the launcher IDs to move
|
||||
for launcher in "$@"; do
|
||||
move_to_sd "$launcher"
|
||||
done
|
||||
else
|
||||
# The first command line argument is not "Move to SD Card"
|
||||
# Use Zenity to get the launcher IDs to move
|
||||
if [[ $options == "Move to SD Card" ]]; then
|
||||
CheckInstallationDirectory
|
||||
|
||||
@ -826,10 +838,18 @@ if [[ $options == "Move to SD Card" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# TODO: verify non-zero exit is necessary
|
||||
# ! Why the non-zero return?
|
||||
IFS="|" read -ra selected_launchers <<< "$move_options"
|
||||
for launcher in "${selected_launchers[@]}"; do
|
||||
move_to_sd "$launcher"
|
||||
done
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
zenity --info --text="The selected directories have been moved to the SD card and symbolic links have been created." --width=200 --height=150
|
||||
fi
|
||||
# Exit the script
|
||||
exit 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Get the command line arguments
|
||||
|
Loading…
Reference in New Issue
Block a user