From cb698090c694af99003af82bfcc36b17d4a83dac Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 8 Oct 2022 17:54:24 +0200 Subject: [PATCH] scripts: Fix nsxiv-rifle to work with symlinks --- scripts/.local/bin/nsxiv-rifle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/.local/bin/nsxiv-rifle b/scripts/.local/bin/nsxiv-rifle index 60b0e3d..a961295 100755 --- a/scripts/.local/bin/nsxiv-rifle +++ b/scripts/.local/bin/nsxiv-rifle @@ -20,7 +20,7 @@ cleanup() { } from_local() { - fpath="$(realpath "$1")" + fpath="$(realpath -e "$1")" ln -s "$fpath" "$cache_dir" } @@ -71,5 +71,5 @@ while [ -n "$1" ]; do shift done -[ "$(find "$cache_dir" -type f -print | wc -l)" -ne 0 ] && +[ "$(find -L "$cache_dir" -type f -print | wc -l)" -ne 0 ] && nsxiv -p "$cache_dir"