Make it all work
This commit is contained in:
parent
eb45983613
commit
4e052a33d4
@ -7,6 +7,7 @@
|
|||||||
* Don't print useless information (stuff that handled 0 files and such)
|
* Don't print useless information (stuff that handled 0 files and such)
|
||||||
* Store transcoded file paths relative to their destination's root
|
* Store transcoded file paths relative to their destination's root
|
||||||
* Add missing error codes (used but not declared)
|
* Add missing error codes (used but not declared)
|
||||||
|
* Support for newline character in filenames
|
||||||
|
|
||||||
# 1.0.4
|
# 1.0.4
|
||||||
## `BREAKING CHANGES`
|
## `BREAKING CHANGES`
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Select() {
|
|||||||
"WHERE ${where_statement[@]})" \
|
"WHERE ${where_statement[@]})" \
|
||||||
",'SQL::Select:not found'" \
|
",'SQL::Select:not found'" \
|
||||||
");" >&3
|
");" >&3
|
||||||
read -u 4 -d$'\0' results
|
read -u 4 -r -d $'\0' results
|
||||||
if ! [[ $results == "SQL::Select:not found" ]]
|
if ! [[ $results == "SQL::Select:not found" ]]
|
||||||
then
|
then
|
||||||
echo "$results"
|
echo "$results"
|
||||||
|
|||||||
@ -3,9 +3,12 @@ openDatabase() {
|
|||||||
[[ -f "$database" ]] || populate_db=1
|
[[ -f "$database" ]] || populate_db=1
|
||||||
rm -f "$tempdir"/sqlite.{in,out}
|
rm -f "$tempdir"/sqlite.{in,out}
|
||||||
mkfifo "$tempdir"/sqlite.{in,out}
|
mkfifo "$tempdir"/sqlite.{in,out}
|
||||||
sqlite3 -bail -newline $'\0' \
|
stdbuf -o0 sqlite3 -bail \
|
||||||
|
-newline $'::AtOM:SQL:EOL::\n' \
|
||||||
"$database" \
|
"$database" \
|
||||||
< "$tempdir/sqlite.in" \
|
< "$tempdir/sqlite.in" \
|
||||||
|
| stdbuf -o0 \
|
||||||
|
sed 's/::AtOM:SQL:EOL::/\x0/g;s/\(\x0\)\xA/\1/g' \
|
||||||
> "$tempdir/sqlite.out" &
|
> "$tempdir/sqlite.out" &
|
||||||
exec 3> "$tempdir"/sqlite.in
|
exec 3> "$tempdir"/sqlite.in
|
||||||
exec 4< "$tempdir"/sqlite.out
|
exec 4< "$tempdir"/sqlite.out
|
||||||
@ -21,7 +24,7 @@ openDatabase() {
|
|||||||
echo 'PRAGMA recursive_triggers = ON;' >&3
|
echo 'PRAGMA recursive_triggers = ON;' >&3
|
||||||
echo 'PRAGMA temp_store = 2;' >&3
|
echo 'PRAGMA temp_store = 2;' >&3
|
||||||
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
||||||
read -u4 -d $'\0'
|
read -u4 -r -d $'\0'
|
||||||
unset REPLY
|
unset REPLY
|
||||||
checkDatabaseVersion
|
checkDatabaseVersion
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user