oh-my-zsh: Fix update script
This commit is contained in:
parent
f076cd769d
commit
416987cfff
@ -6,11 +6,12 @@
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "2020-08-28";
|
version = "2020-08-28";
|
||||||
pname = "oh-my-zsh";
|
pname = "oh-my-zsh";
|
||||||
|
rev = "4ed6fd2b8b6a0efb2f84f00a64503282aca260e7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
owner = "ohmyzsh";
|
owner = "ohmyzsh";
|
||||||
repo = "ohmyzsh";
|
repo = "ohmyzsh";
|
||||||
rev = "4ed6fd2b8b6a0efb2f84f00a64503282aca260e7";
|
|
||||||
sha256 = "0f2f1k6s28lgxpjdgl4s7jisw6dgva9mcsqlsq0wg6041p246nai";
|
sha256 = "0f2f1k6s28lgxpjdgl4s7jisw6dgva9mcsqlsq0wg6041p246nai";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ set -eu -o pipefail
|
|||||||
|
|
||||||
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion oh-my-zsh" | tr -d '"')"
|
oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion oh-my-zsh" | tr -d '"')"
|
||||||
latestSha="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')"
|
latestSha="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')"
|
||||||
url="$(nix-instantiate --eval -E "with import ./. {}; oh-my-zsh.src.url" | tr -d '"')"
|
|
||||||
|
|
||||||
if [ ! "null" = "${latestSha}" ]; then
|
if [ ! "null" = "${latestSha}" ]; then
|
||||||
latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits/${latestSha} | jq '.commit.author.date' | sed 's|"\(.*\)T.*|\1|g')"
|
latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits/${latestSha} | jq '.commit.author.date' | sed 's|"\(.*\)T.*|\1|g')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user