Skip to content

Commit

Permalink
added --version argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaitanya-Shahare committed Oct 13, 2023
1 parent a34319c commit e01be30
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spotify-notifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
current_song=""
current_artist=""

# Check if the argument is "--version" and return the version
if [ "$1" = "--version" ]; then
echo "v1.0.1"
exit 0
fi

# Check if terminal-notifier is installed, and if not, install it
if ! command -v terminal-notifier &> /dev/null; then
echo "Installing terminal-notifier..."
Expand All @@ -30,5 +36,5 @@ while true; do
fi

# Sleep for a few seconds before checking again
sleep 10
sleep 1
done

0 comments on commit e01be30

Please sign in to comment.