From 86ff6b74a733811483add00c67507c77b6acc8ba Mon Sep 17 00:00:00 2001 From: Hydrazer Date: Wed, 1 Jun 2022 16:52:35 -0600 Subject: [PATCH] sqlite3 add argv compitibility --- packages/sqlite3/3.36.0/run | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/sqlite3/3.36.0/run b/packages/sqlite3/3.36.0/run index 8484f3d..3aff0c1 100644 --- a/packages/sqlite3/3.36.0/run +++ b/packages/sqlite3/3.36.0/run @@ -1,3 +1,19 @@ #!/bin/bash -sqlite3 < "$1" +code=`cat "$1"` + +shift + +argv_text="" + +for arg in "$@" +do + argv_text+='insert into argv (arg) values ("'"`echo "$arg" | sed 's/"/""/g'`"'"); +' +done + + +sqlite3 <<< "create table argv (arg text); +$argv_text +$code" +