Make all tests pass on OS X

This commit is contained in:
Konstantin Nazarov 2021-08-21 23:20:21 +01:00
parent d1bc231b91
commit fbc7dea378
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22

View file

@ -276,14 +276,14 @@ pack_part() {
echo "Content-Type: $CONTENT_TYPE" echo "Content-Type: $CONTENT_TYPE"
echo "Content-Transfer-Encoding: base64" echo "Content-Transfer-Encoding: base64"
echo echo
base64 < "$PART_FILE" base64 | fold -w 76 < "$PART_FILE"
fi fi
} }
pack_mime() { pack_mime() {
DIR="$1" DIR="$1"
FILE="$2" FILE="$2"
FILE_COUNT="$(find "$DIR/" -type f | wc -l)" FILE_COUNT="$(find "$DIR/" -type f | wc -l | tr -d " ")"
MIME_TIMESTAMP=$(LC_ALL="en_US.UTF-8" date "+$DATE_FORMAT") MIME_TIMESTAMP=$(LC_ALL="en_US.UTF-8" date "+$DATE_FORMAT")
if [[ "$FILE_COUNT" == "1" ]]; then if [[ "$FILE_COUNT" == "1" ]]; then
@ -525,7 +525,7 @@ list_entries() {
}\ }\
" "
grep -m3 -r -h "^Subject:\|^X-Note-Id:\|^X-Date:" "$BASEDIR" | awk "$FILTER" | sort | cut -d " " -f "2-" grep -r -h "^Subject:\|^X-Note-Id:\|^X-Date:" "$BASEDIR" | awk "$FILTER" | sort | cut -d " " -f "2-"
} }
export_note() { export_note() {