get arguments from packages-to-update, fix version comparison syntax error

This commit is contained in:
Ryan Mulligan 2018-03-19 21:00:52 -07:00
parent d425c5cfc9
commit ba6f302cd1
2 changed files with 2 additions and 2 deletions

2
up.sh
View File

@ -23,7 +23,7 @@ function error_exit {
exit 1
}
if ! [ $(nix-instantiate --eval -E "builtins.compareVersions '$NEW_VERSION' '$OLD_VERSION'") -eq 1 ];
if ! [ "$(nix eval -f . "(builtins.compareVersions \"$NEW_VERSION\" \"$OLD_VERSION\")")" -eq 1 ];
then
error_exit "$NEW_VERSION is not newer than $OLD_VERSION according to Nix"
fi

2
ups.sh
View File

@ -10,7 +10,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
GITHUB_TOKEN="$(cat "$SCRIPT_DIR"/github_token.txt)"
export GITHUB_TOKEN
ARGUMENTS=""
ARGUMENTS=$(cat packages-to-update.txt)
NIXPKGS=$HOME/.cache/nixpkgs
if ! [ -d "$NIXPKGS" ]