summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--global/.local/share/thesiah/snippets2
-rwxr-xr-xmac/.local/bin/ylog17
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_$$"