index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Morten Linderud <foxboron@archlinux.org> | 2024-02-10 12:46:08 +0100 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2024-03-09 00:49:24 +0100 |
commit | 40f476c649e2c1938c391575f4339c6f50b97e7c (patch) | |
tree | fc016d7ab27cfaf0e9a70fdd7a9e57250b198513 /src/lib/aur | |
parent | 509dd24bdcd6c45bd86937fcd1de6fd1fa510441 (diff) |
-rw-r--r-- | src/lib/aur/drop-from-repo.sh | 9 |
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 |