aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqliteSystemData/fix_files.sh
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
committerLibravatarUnit 193 <unit193@ubuntu.com>2017-02-09 04:36:04 -0500
commitd9aa870e5d509cc7309ab82dd102a937ab58613a (patch)
treed92d03d76b5c390b335f1cfd761f1a0b59ec8496 /Plugins/DbSqliteSystemData/fix_files.sh
parent68ee4cbcbe424b95969c70346283a9f217f63825 (diff)
Imported Upstream version 3.1.1+dfsg1upstream/3.1.1+dfsg1
Diffstat (limited to 'Plugins/DbSqliteSystemData/fix_files.sh')
-rw-r--r--Plugins/DbSqliteSystemData/fix_files.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/Plugins/DbSqliteSystemData/fix_files.sh b/Plugins/DbSqliteSystemData/fix_files.sh
new file mode 100644
index 0000000..fcc7505
--- /dev/null
+++ b/Plugins/DbSqliteSystemData/fix_files.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env tclsh
+
+proc process {f} {
+ set fd [open $f r]
+ set data [read $fd]
+ close $fd
+
+ #set data [string map [list systemdata_systemdata_ systemdata_] $data]
+ set data [string map [list sqlite3 systemdata_sqlite3 ../core/ ""] $data]
+
+ set fd [open $f w]
+ puts $fd $data
+ close $fd
+}
+
+foreach f {
+ systemdata_sqlite3.c
+ systemdata_sqlite3.h
+ systemdata_sqlite3ext.h
+ systemdata_interop.c
+ systemdata_extension-functions.c
+ systemdata_crypt.c
+} {
+ process $f
+}
+
+# Concat
+set targetFile systemdata_sqlite3.c
+set srcFiles {
+ systemdata_interop.c
+ systemdata_crypt.c
+ systemdata_extension-functions.c
+}
+
+set trgFd [open $targetFile a+]
+foreach f $srcFiles {
+ set fd [open $f r]
+ puts $trgFd [read $fd]
+ close $fd
+}
+close $trgFd