summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-05-07 17:42:27 +0200
committertv <tv@shackspace.de>2015-05-19 23:17:20 +0200
commit77069f3651c6b166e1f1b4b0b7d0beca9021c45e (patch)
tree0bd5fe59a89bb0a421a48fc8d4fe0cbaa732ef42 /lib
parentd63b684d72e09596c711e4a5d0dfb597c74ebd16 (diff)
prelude.sh: better output, working url/rev check
Diffstat (limited to 'lib')
-rw-r--r--lib/prelude.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/prelude.sh b/lib/prelude.sh
index 98cbea06c..c68bf5571 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 <nixos-config> {config={}; pkgs={};}).nixpkgs.url' \
+ -E '(import <nixos-config> {config={}; pkgs={};}).nixpkgs.url' 2> /dev/null \
| jq -r .
}
@@ -243,7 +243,7 @@ nixpkgs_rev() {
-I nixos-config="$1" \
--eval \
--json \
- -E '(import <nixos-config> {config={}; pkgs={};}).nixpkgs.rev' \
+ -E '(import <nixos-config> {config={}; pkgs={};}).nixpkgs.rev' 2> /dev/null \
| jq -r . 2> /dev/null
}