diff options
Diffstat (limited to 'src/lib/aur')
-rw-r--r-- | src/lib/aur/drop-from-repo.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/aur/drop-from-repo.sh b/src/lib/aur/drop-from-repo.sh index 6ebe12a..1c4f077 100644 --- a/src/lib/aur/drop-from-repo.sh +++ b/src/lib/aur/drop-from-repo.sh @@ -92,14 +92,19 @@ pkgctl_aur_drop_from_repo() { fi for path in "${paths[@]}"; do - if ! realpath=$(realpath -e "${path}"); then + # resolve symlink for basename + if ! realpath=$(realpath --canonicalize-existing -- "${path}"); then die "No such directory: ${path}" fi + # skip paths that are not directories + if [[ ! -d "${realpath}" ]]; then + continue + fi pkgbase=$(basename "${realpath}") pkgbase=${pkgbase%.git} - if [[ ! -d "${path}/.git" ]]; then + if [[ ! -d "${realpath}/.git" ]]; then die "Not a Git repository: ${path}" fi |