- ! [ -e "$repo/refs/heads/tags" ] || \
- cp -a "$repo/refs/heads/tags/." "$repo/refs/tags" && \
- rm -rf "$repo/refs/heads/tags"
+ if [ -e "$repo/refs/heads/tags" ]; then
+ cp -a "$repo/refs/heads/tags/." "$repo/refs/tags"
+ rm -rf "$repo/refs/heads/tags"
+ fi