eli-schwartz / aurpublish

PKGBUILD management framework for the Arch User Repository
GNU General Public License v2.0
246 stars 18 forks source link

Breaks when a directory exists without git subtree #15

Open aminvakil opened 3 years ago

aminvakil commented 3 years ago

When there is already a folder containing a package with the name of pkgname, it will break as it thinks it has already been included.

https://github.com/eli-schwartz/aurpublish/blob/11aeeaa7bffde550289f65468a7f7064b9f10367/aurpublish.in#L142-L148

Can't is_package_in_git improve to check this too?

https://github.com/eli-schwartz/aurpublish/blob/11aeeaa7bffde550289f65468a7f7064b9f10367/aurpublish.in#L47-L49

I have found this command to check configured git subtrees: git log | grep git-subtree-dir | tr -d ' ' | cut -d ":" -f2 | sort | uniq, but it will already break if subtree has been added and folder removed later, so I'm not sure about this.