aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/scripts/file-search34
1 files changed, 17 insertions, 17 deletions
diff --git a/.local/bin/scripts/file-search b/.local/bin/scripts/file-search
index efd0824..130b90c 100755
--- a/.local/bin/scripts/file-search
+++ b/.local/bin/scripts/file-search
@@ -5,23 +5,23 @@ append() { find "$1" -maxdepth 1 -printf "%p\n" 2> /dev/null || true; }
appendRecursive() { find "$1" -printf "%p\n" 2>/dev/null || true; }
removeDuplicates() { awk '!visited[$0]++' "$1" | sponge "$1"; }
-{ [ ! -f "$cache" ] \
- || [ "${1:-}" = "update" ]; } \
- && {
- append "$HOME";
- append "$HOME"/.local;
- append "$HOME"/Desktop;
- append "$HOME"/Shares/Projects;
- appendRecursive "$HOME"/.vim;
- appendRecursive "$HOME"/.local/bin;
- appendRecursive "$HOME"/.config;
- appendRecursive "$HOME"/Music;
- appendRecursive "$HOME"/Books;
- appendRecursive "$HOME"/Videos;
- appendRecursive "$HOME"/Documents;
- appendRecursive "$HOME"/Downloads;
- appendRecursive "$HOME"/Pictures;
- } | grep -vE '(undodir)' > "$cache"
+{ [ ! -f "$cache" ] || [ "${1:-}" = "update" ]; } && \
+ {
+ append "$HOME";
+ append "$HOME"/.local;
+ append "$HOME"/Desktop;
+ append "$HOME"/Shares/Projects;
+ appendRecursive "$HOME"/.vim;
+ appendRecursive "$HOME"/.local/bin;
+ appendRecursive "$HOME"/.config;
+ appendRecursive "$HOME"/Music;
+ appendRecursive "$HOME"/Books;
+ appendRecursive "$HOME"/Videos;
+ appendRecursive "$HOME"/Documents;
+ appendRecursive "$HOME"/Downloads;
+ appendRecursive "$HOME"/Pictures;
+ } \
+ | grep -vE '(undodir)' > "$cache"
[ "${1:-}" = "update" ] && removeDuplicates "$cache" && exit;