git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9d8be0
)
Fix version output when missing.
extensible
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 16 Oct 2010 23:10:31 +0000
(19:10 -0400)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Sat, 16 Oct 2010 23:10:31 +0000
(19:10 -0400)
plc.d/db
patch
|
blob
|
history
diff --git
a/plc.d/db
b/plc.d/db
index
644a3ad
..
6bf6388
100755
(executable)
--- a/
plc.d/db
+++ b/
plc.d/db
@@
-30,7
+30,7
@@
function extend_db()
extension=${script##*.}
version=$(psql -U $PLC_DB_USER --quiet --tuples-only --no-align -c \
"SELECT version FROM plc_db_extensions WHERE name='$name' LIMIT 1" \
- $PLC_DB_NAME 2>/dev/null | awk '/^[0-9]+$/ { ver=$1 } END { print ver }')
+ $PLC_DB_NAME 2>/dev/null | awk '
BEGIN { ver=0 }
/^[0-9]+$/ { ver=$1 } END { print ver }')
if [ $version -eq 0 ]; then
if [ "$extension" = "sql" ] ; then
dialog " - $script (dbdumped)"