Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
install.sh: fix version check by using Aplle's official plist parsing…
Browse files Browse the repository at this point in the history
… tool (#85)

Co-authored-by: Red <nuzer501@gmail.com>
  • Loading branch information
MaEtUgR and Nuzair46 authored Dec 17, 2024
1 parent a45c99c commit f2c21dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ XPUI_DESKTOP_MODAL_JS="${XPUI_DIR}/xpui-desktop-modals.js"
if [[ "${UNINSTALL_FLAG}" == "true" ]]; then
if [[ ! -f "${XPUI_BAK}" ]] || [[ ! -f "${APP_BINARY_BAK}" ]]; then
echo -e "Backup not found, BlockTheSpot-Mac has not been used on this installation."
exit
exit
fi
echo "Backup found, restoring original..."
rm "${XPUI_SPA}"
Expand All @@ -82,8 +82,7 @@ if [[ "${UNINSTALL_FLAG}" == "true" ]]; then
fi

# Find client version
#Fix Using plutil:"awk: towc: multibyte conversion failure on: '?! '"
CLIENT_VERSION=$(plutil -p "${INSTALL_PATH}/Contents/Info.plist" | grep CFBundleShortVersionString | awk -F'"' '{print $4}')
CLIENT_VERSION=$(defaults read "${INSTALL_PATH}/Contents/Info.plist" CFBundleVersion)

# Get Mac OS Architecture
MAC_ARCH=$(uname -m)
Expand Down Expand Up @@ -160,7 +159,7 @@ elif ! command -v codesign &> /dev/null; then
echo "Install the Xcode command line tools to enable code signature checks."
echo "With xcode-select --install";
echo "You can try to skip code signature checks with the -S flag. Exiting..."
exit;
exit;
fi

# xpui detection
Expand Down Expand Up @@ -257,7 +256,7 @@ if [[ "${XPUI_SKIP}" == "false" ]]; then
if [[ $(ver "${CLIENT_VERSION}") -ge $(ver "1.1.98.683") ]]; then
echo "Hiding non-music items on home screen..."
$PERL "${HIDE_PODCASTS3}" "${XPUI_JS}"; fi; fi; fi

# Automatic updates handling
if [[ "${UPDATE_FLAG}" == "true" ]]; then
echo "Blocking updates..."
Expand Down

0 comments on commit f2c21dc

Please sign in to comment.