1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p bash nix-update curl coreutils jq
6 SCRIPT_DIR
="$(cd "$
(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
9 curl
${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
12 case "$UPDATE_NIX_ATTR_PATH" in
14 latestTag
=$
(curl_github https
://api.github.com
/repos
/signalapp
/Signal-Desktop
/releases
/latest | jq
-r ".tag_name")
15 latestVersion
="$(expr "$latestTag" : 'v\(.*\)')"
16 latestVersionAarch64
=$
(curl_github
"https://api.github.com/repos/0mniteck/Signal-Desktop-Mobian/releases/latest" | jq
-r ".tag_name")
18 echo "Updating signal-desktop for x86_64-linux"
19 nix-update
--version "$latestVersion" \
20 --system x86_64-linux \
21 --override-filename "$SCRIPT_DIR/signal-desktop.nix" \
24 echo "Updating signal-desktop for aarch64-linux"
25 nix-update
--version "$latestVersionAarch64" \
26 --system aarch64-linux \
27 --override-filename "$SCRIPT_DIR/signal-desktop-aarch64.nix" \
30 echo "Updating signal-desktop for darwin"
31 nix-update
--version "$latestVersion" \
32 --system aarch64-darwin \
33 --override-filename "$SCRIPT_DIR/signal-desktop-darwin.nix" \
37 latestTagBeta
=$
(curl_github https
://api.github.com
/repos
/signalapp
/Signal-Desktop
/releases | jq
-r ".[0].tag_name")
38 latestVersionBeta
="$(expr "$latestTagBeta" : 'v\(.*\)')"
39 echo "Updating signal-desktop-beta for x86_64-linux"
40 nix-update
--version "$latestVersionBeta" --system x86_64-linux
--override-filename "$SCRIPT_DIR/signal-desktop-beta.nix" signal-desktop-beta
43 echo "Unknown attr path $UPDATE_NIX_ATTR_PATH"