From 38db85ed2e9e65c82f0e2713c7c10e5b412a75a1 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 7 May 2015 17:42:27 +0200 Subject: prelude.sh: better output, working url/rev check --- lib/prelude.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/prelude.sh') diff --git a/lib/prelude.sh b/lib/prelude.sh index 98cbea0..c68bf55 100644 --- a/lib/prelude.sh +++ b/lib/prelude.sh @@ -38,7 +38,7 @@ deploy() {( git_url=$(nixpkgs_url $main) git_rev=$(nixpkgs_rev $main) - if [ $git_url = '' ] || [ $git_rev = '' ]; then + if [ "$git_url" = '' ] || [ "$git_rev" = '' ]; then echo "specify nixpkgs.url and nixpkgs.rev in $main !" exit 23 fi @@ -233,7 +233,7 @@ nixpkgs_url() { -I nixos-config="$1" \ --eval \ --json \ - -E '(import {config={}; pkgs={};}).nixpkgs.url' \ + -E '(import {config={}; pkgs={};}).nixpkgs.url' 2> /dev/null \ | jq -r . } @@ -243,7 +243,7 @@ nixpkgs_rev() { -I nixos-config="$1" \ --eval \ --json \ - -E '(import {config={}; pkgs={};}).nixpkgs.rev' \ + -E '(import {config={}; pkgs={};}).nixpkgs.rev' 2> /dev/null \ | jq -r . 2> /dev/null } -- cgit v1.2.3