@@ -13,7 +13,7 @@ let
1313 primaryBinary = "sublime_text";
1414 primaryBinaryAliases = [ "subl" "sublime" "sublime3" ];
1515 downloadUrl = "https://download.sublimetext.com/sublime_text_3_build_${buildVersion}_${arch}.tar.bz2";
16− versionUrl = "https://www.sublimetext.com/${if dev then "3dev" else "3"}";
16+ versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}";
1717 versionFile = builtins.toString ./packages.nix;
1818 archSha256 =
1919 if stdenv.hostPlatform.system == "i686-linux" then
@@ -133,7 +133,12 @@ in stdenv.mkDerivation (rec {
133133 set -o errexit
134134 PATH=${stdenv.lib.makeBinPath [ common-updater-scripts curl gnugrep ]}
135135
136− latestVersion=$(curl -s ${versionUrl} | grep -Po '(?<=<p class="latest"><i>Version:</i> Build )([0-9]+)')
136+ latestVersion=$(curl -s ${versionUrl})
137+
138+ if [[ "${buildVersion}" = "$latestVersion" ]]; then
139+ echo "The new version same as the old version."
140+ exit 0
141+ fi
137142
138143 for platform in ${stdenv.lib.concatStringsSep " " meta.platforms}; do
139144 # The script will not perform an update when the version attribute is up to date from previous platform run