Created
November 19, 2023 18:35
-
-
Save danielnunez/9c4248c5cdb435f7212f1423f723b964 to your computer and use it in GitHub Desktop.
Revisions
-
tuxity revised this gist
Dec 8, 2021 . 3 changed files with 47 additions and 38 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,19 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ #!/bin/bash set -e file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist) regex="CFBundleShortVersionString = \"([^\.]+)" [[ $file =~ $regex ]] version=${BASH_REMATCH[1]} echo "Detected Navicat Premium version $version" case $version in "16") file=~/Library/Preferences/com.navicat.NavicatPremium.plist ;; "15") file=~/Library/Preferences/com.prect.NavicatPremium15.plist ;; *) echo "Version '$version' not handled" exit 1 ;; esac echo -n "Reseting trial time..." regex="([0-9A-Z]{32}) = " [[ $(defaults read $file) =~ $regex ]] hash=${BASH_REMATCH[1]} if [ ! -z $hash ]; then defaults delete $file $hash fi regex="\.([0-9A-Z]{32})" [[ $(ls -a ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ | grep '^\.') =~ $regex ]] hash2=${BASH_REMATCH[1]} if [ ! -z $hash2 ]; then rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2 fi echo " Done" -
tuxity revised this gist
Dec 8, 2021 . 1 changed file with 19 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash file=$(defaults read ~/Library/Preferences/com.navicat.NavicatPremium.plist) regex="([0-9A-Z]{32}) = {" [[ $file =~ $regex ]] defaults delete ~/Library/Preferences/com.navicat.NavicatPremium.plist ${BASH_REMATCH[1]} cd ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ str=$(ls -a | grep '^\.') regex="\.([0-9A-Z]{32})" [[ $str =~ $regex ]] rm .${BASH_REMATCH[1]} cd - -
tuxity created this gist
Mar 18, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ #!/bin/bash file=$(defaults read ~/Library/Preferences/com.prect.NavicatPremium15.plist) regex="([0-9A-Z]{32}) = {" [[ $file =~ $regex ]] defaults delete ~/Library/Preferences/com.prect.NavicatPremium15.plist ${BASH_REMATCH[1]} cd ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ str=$(ls -a | grep '^\.') regex="\.([0-9A-Z]{32})" [[ $str =~ $regex ]] rm .${BASH_REMATCH[1]} cd -