Fix for Windows (#2)

Windows sqlite3.exe generates file in dos format and the extra `\r` causes wrong curl command and deletion failure.
Instead of `cat` lines, use `sed` to trim the `\r`.
This commit is contained in:
12425 2021-04-04 18:05:28 -07:00 committed by GitHub
parent 6a3a701a6f
commit b5010d5759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
jnrmor
View File

@ -280,7 +280,7 @@ if [ "$fflag" != "1" ]; then
fi
fi
for id in `cat $TMPFILE`
for id in `sed 's/\s\+$//' $TMPFILE`
do
curlCMD="curl -s -X DELETE http://localhost:${CLIPPER_PORT}/resources/${id}?token=${CLIPPER_TOKEN}"
debug "$curlCMD"