echo"could not find the latest $attribute for $channel"
echo"could not find the latest $attribute for $channel">&2
exit 1
fi
}
updateChannel(){
local channel="$1"
local latestVersion="$(getLatest "version""$channel")"
local latestVersion="$(getLatest ".version""$channel")"
local localVersion="$(nix --extra-experimental-features nix-command eval--raw--file. androidStudioPackages."${channel}".version)"
if[["${latestVersion}"=="${localVersion}"]];then
@@ -40,15 +40,24 @@ updateChannel() {
fi
echo"updating $channel from $localVersion to $latestVersion"
local latestHash="$(nix-prefetch-url "https://dl.google.com/dl/android/studio/ide-zips/${latestVersion}/android-studio-${latestVersion}-linux.tar.gz")"
local latestSri="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$latestHash")"
local latestUrl="$(getLatest "[.download[] | select(.link | endswith(\"-linux.tar.gz\"))][0].link""$channel")"
local latestHash="$(getLatest "[.download[] | select(.link | endswith(\"-linux.tar.gz\"))][0].checksum""$channel")"