mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
24 lines
462 B
Awk
24 lines
462 B
Awk
|
BEGIN {
|
||
|
print "{"
|
||
|
loc=""
|
||
|
ref=""
|
||
|
isGit=false
|
||
|
}
|
||
|
/source-repository-package/ { loc=""; ref=""; isGit=false; }
|
||
|
|
||
|
/type: git/ { isGit=true; }
|
||
|
/location/ && isGit == true { loc=$2 }
|
||
|
/tag/ && isGit == true { ref=$2 }
|
||
|
|
||
|
isGit == true && loc != "" && ref != "" {
|
||
|
cmd = "nix-prefetch-git --quiet "loc" "ref" | jq -r .sha256"
|
||
|
cmd | getline sha256
|
||
|
close(cmd)
|
||
|
print " \""loc"\".\""ref"\" = \""sha256"\";";
|
||
|
isGit=false; loc=""; ref="";
|
||
|
}
|
||
|
|
||
|
END {
|
||
|
print "}"
|
||
|
}
|