From 0a9e7c33ed6ba60ffd213190dbf328ec5bb4b4bf Mon Sep 17 00:00:00 2001 From: Roger Leigh Date: Fri, 3 Dec 2010 09:55:44 +0000 Subject: [PATCH] schema: Fix missing brace and broken script The script would fail if arches-tables.sql didn't already exist. The generated SQL was broken due to missing brace in CREATE TABLE. --- schema/arches-tables.in | 1 + schema/arches-tables.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/schema/arches-tables.in b/schema/arches-tables.in index 8a327e1..a7b649b 100644 --- a/schema/arches-tables.in +++ b/schema/arches-tables.in @@ -8,6 +8,7 @@ grant usage on schema "ARCH_public" to "ARCH", public; grant usage on schema "ARCH" to wb_security; create table "ARCH".packages +( package character varying NOT NULL, distribution character varying NOT NULL, version character varying, diff --git a/schema/arches-tables.sh b/schema/arches-tables.sh index 846ce65..0118c35 100755 --- a/schema/arches-tables.sh +++ b/schema/arches-tables.sh @@ -2,5 +2,5 @@ ARCHES="alpha amd64 arm armel hppa i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 sparc" -rm arches-tables.sql +rm -f arches-tables.sql for arch in $ARCHES; do sed -e "s/ARCH/$arch/g" < arches-tables.in >> arches-tables.sql ; done -- 2.39.2