Fix basics to work on OS X. Still have a few things to go.
This commit is contained in:
parent
c50d49ec10
commit
d1bc231b91
2 changed files with 3 additions and 3 deletions
4
notes.sh
4
notes.sh
|
@ -230,7 +230,7 @@ unpack_part() {
|
|||
BOUNDARY=$(echo "$MIME_TYPE" | sed -n 's/^.*boundary="\(.*\)"$/\1/p')
|
||||
i=1
|
||||
while true; do
|
||||
TMP=$(mktemp --tmpdir="$DIR")
|
||||
TMP=$(mktemp "$DIR/tmp.XXXXXXXX")
|
||||
get_part "$FILE" "$BOUNDARY" "$i" > "$TMP"
|
||||
((i++))
|
||||
if [ ! -s "$TMP" ]; then
|
||||
|
@ -256,7 +256,7 @@ unpack_mime() {
|
|||
get_headers "$FILE" | grep -v "^Content-Type\|^Content-Disposition\|^Date\|^MIME-Version" >> "$DIR/note.md"
|
||||
echo "" >> "$DIR/note.md"
|
||||
|
||||
TMP=$(mktemp --tmpdir="$DIR")
|
||||
TMP=$(mktemp "$DIR/tmp.XXXXXXXX")
|
||||
cat "$FILE" > "$TMP"
|
||||
|
||||
(unpack_part "$TMP" "$DIR")
|
||||
|
|
2
test.sh
2
test.sh
|
@ -231,7 +231,7 @@ resume_editing() {
|
|||
"$BASE_DIR/notes.sh" -e "$NOTE_ID" 2>/dev/null || true
|
||||
|
||||
OUTPUT="$(cat "$(pwd)/notes/cur"/*)"
|
||||
assert 'echo "$OUTPUT" | grep myline | wc -l' "1"
|
||||
assert 'echo "$OUTPUT" | grep myline | wc -l | tr -d " "' "1"
|
||||
|
||||
cat > "$(pwd)/editor.sh" <<- EOF
|
||||
#!/bin/bash
|
||||
|
|
Loading…
Reference in a new issue