diff options
Diffstat (limited to 'src/lib/aur/drop-from-repo.sh')
-rw-r--r-- | src/lib/aur/drop-from-repo.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/aur/drop-from-repo.sh b/src/lib/aur/drop-from-repo.sh index 6ebe12a..0e9cab4 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 @@ -136,9 +141,9 @@ pkgctl_aur_drop_from_repo() { if (( FORCE )); then AUR_OVERWRITE=1 \ GIT_SSH_COMMAND="ssh -o SendEnv=AUR_OVERWRITE" \ - git push --force origin master + git push --force --no-follow-tags origin master else - git push origin master + git push --no-follow-tags origin master fi # update the local default branch in case this clone is used in the future |