aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqliteWx/add_prefix.tcl
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:51:12 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2018-07-27 23:51:12 -0400
commitfeda8a7db8d1d7c5439aa8f8feef7cc0dd2b59a0 (patch)
tree1e50f5f666f419143f510d5ded00fe2006b7bd85 /Plugins/DbSqliteWx/add_prefix.tcl
parentd9aa870e5d509cc7309ab82dd102a937ab58613a (diff)
New upstream version 3.2.1+dfsg1upstream/3.2.1+dfsg1
Diffstat (limited to 'Plugins/DbSqliteWx/add_prefix.tcl')
-rw-r--r--Plugins/DbSqliteWx/add_prefix.tcl29
1 files changed, 29 insertions, 0 deletions
diff --git a/Plugins/DbSqliteWx/add_prefix.tcl b/Plugins/DbSqliteWx/add_prefix.tcl
new file mode 100644
index 0000000..74e3e9f
--- /dev/null
+++ b/Plugins/DbSqliteWx/add_prefix.tcl
@@ -0,0 +1,29 @@
+#!/usr/bin/env tclsh
+
+proc process {f} {
+ set fd [open $f r]
+ set data [read $fd]
+ close $fd
+
+ set data [string map [list sqlite3 wx_sqlite3] $data]
+ set data [string map [list wx_sqlite3.c wxsqlite3.c] $data]
+ set data [string map [list wx_sqlite3.h wxsqlite3.h] $data]
+
+ set fd [open $f w]
+ puts $fd $data
+ close $fd
+}
+
+if {[file exists sqlite3.c]} {
+ file rename -force sqlite3.c wxsqlite3.c
+}
+
+if {[file exists sqlite3.h]} {
+ file rename -force sqlite3.h wxsqlite3.h
+ file copy -force wxsqlite3.h wxsqlite3_unmodified.h
+}
+
+foreach f [concat [glob -nocomplain *.c] [glob -nocomplain *.h]] {
+ if {[string match -nocase "dbsqlitewx*" $f]} continue
+ process $f
+}