diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-28 01:34:08 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-09-28 01:34:08 +0900 |
| commit | 27dc4b4270481f7da877b31f122c03e6c0751811 (patch) | |
| tree | 9406330555b62e3cce7d921dbd503149449a27f9 | |
| parent | 8608dc2306a8712dde4802ffe73c640947676333 (diff) | |
modified thesiah/snippets, modified bin/ylog
| -rw-r--r-- | global/.local/share/thesiah/snippets | 2 | ||||
| -rwxr-xr-x | mac/.local/bin/ylog | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/global/.local/share/thesiah/snippets b/global/.local/share/thesiah/snippets index 9611667..a8ad625 100644 --- a/global/.local/share/thesiah/snippets +++ b/global/.local/share/thesiah/snippets @@ -4,6 +4,6 @@ git TheSiahxyz https://git.thesiah.xyz github TheSiahxyz https://github.com/TheSiahxyz?tab=repositories mail TheSiahxyz https://mail.thesiah.xyz nextcloud TheSiahxyz https://nextcloud.thesiah.xyz -videos TheSiahxyz https://videos.thesiah.xyz +videos TheSiahxyz https://video.thesiah.xyz rss https://ftr.thesiah.xyz rss-bridge https://rss-bridge.thesiah.xyz diff --git a/mac/.local/bin/ylog b/mac/.local/bin/ylog index e339b2a..1cfc52f 100755 --- a/mac/.local/bin/ylog +++ b/mac/.local/bin/ylog @@ -107,13 +107,24 @@ pick_files() { # build exclude regex build_exre() { EXRE="" + TEMP_FILE="/tmp/.ylog_exre_$$" + rm -f "$TEMP_FILE" + { printf "%s\n" "${EXCLUDES:-}"; printf "%s\n" "${ADD_EXCLUDES:-}"; } | sed "/^$/d" | while IFS= read -r pat do esc=$(printf "%s" "$pat" | sed -E "s/[][^$.*/+?(){}|\\]/\\\\&/g") - if [ -z "$EXRE" ]; then EXRE="$esc"; else EXRE="$EXRE|$esc"; fi - printf "%s\n" "$EXRE" > "/tmp/.ylog_exre_$$" + if [ -s "$TEMP_FILE" ]; then + EXRE="$(cat "$TEMP_FILE")|$esc" + else + EXRE="$esc" + fi + printf "%s" "$EXRE" > "$TEMP_FILE" done - if [ -f "/tmp/.ylog_exre_$$" ]; then cat "/tmp/.ylog_exre_$$"; rm -f "/tmp/.ylog_exre_$$"; fi + + if [ -f "$TEMP_FILE" ]; then + cat "$TEMP_FILE" + rm -f "$TEMP_FILE" + fi } FILES_TMP="/tmp/.ylog_files_$$" |
