satellite/satellitedb/dbx: Remove bashism from gen.sh
Change-Id: Ia698edae99d7ff0c73fa457b4a3c0a7b5f0bbec5
This commit is contained in:
parent
16bb374deb
commit
a9e4c6f66d
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
dbx schema -d postgres -d cockroach satellitedb.dbx .
|
||||
dbx golang -d postgres -d cockroach -p dbx -t templates satellitedb.dbx .
|
||||
( echo '//lint:file-ignore * generated file'; cat satellitedb.dbx.go ) > satellitedb.dbx.go.tmp && mv satellitedb.dbx.go{.tmp,}
|
||||
( echo '//lint:file-ignore * generated file'; cat satellitedb.dbx.go ) > satellitedb.dbx.go.tmp && mv satellitedb.dbx.go.tmp satellitedb.dbx.go
|
||||
gofmt -r "*sql.Tx -> tagsql.Tx" -w satellitedb.dbx.go
|
||||
perl -0777 -pi \
|
||||
-e 's,\t"github.com/lib/pq"\n\),\t"github.com/lib/pq"\n\n\t"storj.io/storj/private/tagsql"\n\),' \
|
||||
@ -12,4 +12,4 @@ perl -0777 -pi \
|
||||
satellitedb.dbx.go
|
||||
perl -0777 -pi \
|
||||
-e 's/\tdb = &DB\{\n\t\tDB: sql_db,/\tdb = &DB\{\n\t\tDB: tagsql.Wrap\(sql_db\),/' \
|
||||
satellitedb.dbx.go
|
||||
satellitedb.dbx.go
|
||||
|
Loading…
Reference in New Issue
Block a user