Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install.sh: fix version check by using Aplle's official plist parsing tool #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MaEtUgR
Copy link

@MaEtUgR MaEtUgR commented Nov 22, 2024

Problem

image

Solution

I hadn't seen #83 and figured out how to properly parse a plist file on the terminal without bash hackery:
defaults read "/Applications/Spotify.app/Contents/Info.plist" CFBundleVersion
This solution should hold up for much longer without braking since I'm using Apple's official parsing tool.

Until this gets merged just change line 85 of install.sh from
CLIENT_VERSION=$(awk '/CFBundleShortVersionString/{getline; print}' "${INSTALL_PATH}/Contents/Info.plist" | cut -d\> -f2- | rev | cut -d. -f2- | rev)
to
CLIENT_VERSION=$(defaults read "${INSTALL_PATH}/Contents/Info.plist" CFBundleVersion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant