From c7dbc6aa112e726c9dab4ffc0ac01a9366cd086b Mon Sep 17 00:00:00 2001 From: TJ Luoma Date: Wed, 12 Jun 2019 23:04:58 -0400 Subject: [PATCH] remove support for version 7 --- di-skype.sh | 141 ++-------------------------------------------------- 1 file changed, 3 insertions(+), 138 deletions(-) diff --git a/di-skype.sh b/di-skype.sh index 611a8e25..44e73db8 100755 --- a/di-skype.sh +++ b/di-skype.sh @@ -22,58 +22,10 @@ else PATH='/usr/local/scripts:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin' fi -function use_v7 { +URL=$(curl -sfLS --head 'https://get.skype.com/go/getskype-skypeformac' \ + | awk -F'\r| ' '/^.ocation/{print $2}') - # via https://go.skype.com/classic.skype - URL='https://download.skype.com/macosx/bf9ccdd6b5b079049ff5a87419033ce3/Skype_7.59.37.dmg' - LATEST_VERSION="7.59.0.37" - ASTERISK='(Note that version 8 is also available.)' - USE_VERSION='7' -} - -function use_v8 { - - USE_VERSION='8' - - URL=$(curl -sfLS --head 'https://get.skype.com/go/getskype-skypeformac' \ - | awk -F'\r| ' '/^.ocation/{print $2}') - - LATEST_VERSION=$(echo "$URL:t:r" | tr -dc '[0-9]\.') - -} - -if [[ -e "$INSTALL_TO" ]] -then - # if v7 is installed, check that. Otherwise, use v8 - MAJOR_VERSION=$(defaults read "$INSTALL_TO/Contents/Info" CFBundleVersion | cut -d. -f1) - - if [[ "$1" == "--force7" ]] - then - - if [[ "$MAJOR_VERSION" -gt "7" ]] - then - echo "$NAME: Version $MAJOR_VERSION is installed. Removing it and installing to version 7." - - rm -rf "$INSTALL_TO" || sudo rm -rf "$INSTALL_TO" - fi - - use_v7 - - elif [[ "$MAJOR_VERSION" == "7" ]] - then - use_v7 - else - use_v8 - fi -else - if [ "$1" = "--use7" -o "$1" = "-7" -o "$1" = "--force7" ] - then - use_v7 - - else - use_v8 - fi -fi +LATEST_VERSION=$(echo "$URL:t:r" | tr -dc '[0-9]\.') # If any of these are blank, we should not continue if [ "$URL" = "" -o "$LATEST_VERSION" = "" ] @@ -172,92 +124,5 @@ echo "$NAME: Unmounting $MNTPNT:" diskutil eject "$MNTPNT" -if (( $+commands[di-skypecallrecorder-private.sh] )) -then - # if 'di-skypecallrecorder-private.sh' exists, run it. - # n.b. that script can't be shared because the download link contains the user's registration code. - di-skypecallrecorder-private.sh -fi - -PLIST="$HOME/Library/Preferences/com.skype.skype.plist" - -[[ -e "$PLIST" ]] && exit 0 - -## If there is no plist, create one. -## Basically, I want to make sure that Skype doesn't try to automatically force me to “upgrade” to version 8. -## -## That involves setting this, I think: -## -## SKAllowStealthUpgrade -## -## -## but it's just as easy to create the whole plist from an example one I had around. - -cat < "$PLIST" - - - - - AutoCollapseChatView - - AutoCollapseSidebar - - ChatViewIsCollapsed - - DialpadOpen - - DisableWebKitDeveloperExtras - - HasMigratedUserDefinedEvents_2 - - HockeySDKAutomaticallySendCrashReports - - HockeySDKCrashReportActivated - - IncludeDebugMenu - - LastUserSidebarWidth - 200 - NSFullScreenMenuItemEverywhere - - NSSplitView Subview Frames MainSplitView - - 0.000000, 0.000000, 200.000000, 600.000000, NO, NO - 201.000000, 0.000000, 649.000000, 600.000000, NO, NO - - NSStatusItem Preferred Position Item-0 - 1000 - NSTreatUnknownArgumentsAsOpen - NO - NSWindow Frame DialpadMonitor - 154 154 207 234 0 0 1440 877 - SKAllowStealthUpgrade - - SKAvatarCacheDiskCacheVersion - 22 - SKDisableWelcomeTour - - SKLocationDataCacheDiskCacheVersion - 4 - SKMacUserSkypeVersion - 7.59.0.37 - SKShowCallDebugAutomatically - - SKShowWelcomeTour - - SKUpgradedFromVersion - 7.56.0.776 - SKUpgradedWithUpgradeType - 2 - ShowDialpadOnLogin - - SidebarIsCollapsed - - WebKitDeveloperExtras - - - -EOINPUT - exit 0 #EOF