lib: fixfix
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 23:04:19 +0200
changeset 631 5eebbda7be91
parent 630 18939b861476
child 632 711be783d0a1
lib: fixfix
bin/update
lib/pvl/log.sh
lib/pvl/test.sh
--- a/bin/update	Thu Feb 26 22:57:08 2015 +0200
+++ b/bin/update	Thu Feb 26 23:04:19 2015 +0200
@@ -14,6 +14,7 @@
 
 . $LIB/pvl/commit.sh
 . $LIB/pvl/apply.sh
+. $LIB/pvl/test.sh
 
 . $LIB/pvl/hosts/update.sh
 
--- a/lib/pvl/log.sh	Thu Feb 26 22:57:08 2015 +0200
+++ b/lib/pvl/log.sh	Thu Feb 26 23:04:19 2015 +0200
@@ -139,6 +139,10 @@
     log_warn "$(func_caller): $*"
 }
 
+function error {
+    log_error "$(func_caller): $*"
+}
+
 # Log with func_caller at log_error and exit, intended for internal errors...
 function fail {
     log_error "$(func_caller): $*"
--- a/lib/pvl/test.sh	Thu Feb 26 22:57:08 2015 +0200
+++ b/lib/pvl/test.sh	Thu Feb 26 23:04:19 2015 +0200
@@ -6,15 +6,14 @@
 function test_cmd {
     local src="$1"
     local cmd="$2"
-    local args="${@:3}"
 
-    if cmd_test "$cmd" -q "${args[@]}"; then
+    if cmd_test "$cmd" -q "${@:3}"; then
         log_skip "$src: test: OK"
 
     else
         log_error "$src: test: Failed"
 
-        cmd_indent "    " "$cmd" "${args[@]}"
+        cmd_indent "    " "$cmd" "${@:3}"
 
         return 1
     fi