omoidasu

a flashcard review system built on oboeru
git clone anongit@rnpnr.xyz:omoidasu.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 4936ba5975c71370be452e2819996b9af9d99b2f
Parent: 5d200c92b36a35fe47fa192a18b5fdbb9cb77a5d
Author: Randy Palamar
Date:   Sat, 18 Sep 2021 21:04:50 -0600

gencard,review: make sure permissions are set when they need to be

Diffstat:
Mgencard | 2++
Mreview | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gencard b/gencard @@ -26,11 +26,13 @@ line=$(grep "$DELIM$2\$" $1) id=$(nextcardid "$1") time=$(date $TIMEFMT) +chmod +w "$1" printf "%s"$DELIM"%s"$DELIM"%s"$DELIM"%d"$DELIM"%s\n" \ "$id" "$time" "$time" 0 "$2" >> "$1" sort -r "$1">|"$tmp" mv "$tmp" "$1" +chmod -w "$1" deck=$(echo "$1" | cut -d '.' -f 1) path=$(printf "%s/%s" "$deck" "$id") diff --git a/review b/review @@ -19,6 +19,7 @@ trap die EXIT INT TERM mkfifo -m 0600 $fifo $sync +chmod +w "$@" oboeru $fifo "$@" > $sync & oboerudata $sync \ | oboeruhttp -p "$PORT" -F "$FAIL" -P "$PASS" -Q "$QUIT" -S "$SHOW" -q "$BYE" \ @@ -27,3 +28,4 @@ oboerudata $sync \ browser "localhost:$PORT" wait +chmod -w "$@"