87f9c27ba9
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
13 lines
468 B
Bash
Executable file
13 lines
468 B
Bash
Executable file
#!/usr/bin/env nix-shell
|
|
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
|
|
set -eo pipefail
|
|
|
|
new_version="$(curl -s "https://api.github.com/repos/pqrs-org/Karabiner-Elements/releases/latest" | jq -r '.tag_name | ltrimstr("v")')"
|
|
old_version="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)"
|
|
|
|
if [[ "$new_version" == "$old_version" ]]; then
|
|
echo "Already up to date!"
|
|
exit 0
|
|
fi
|
|
|
|
update-source-version karabiner-elements "${new_version}"
|