Allow for git remote url to end in aports.git, (i.e., allow SSH git remotes)

This commit is contained in:
Pete Dietl 2019-05-23 17:30:28 -05:00 committed by Natanael Copa
parent 6310405af8
commit 7a8b3a8e7d

View File

@ -87,8 +87,9 @@ readconfig() {
APORTSDIR=$(cd "$HOME/aports"; pwd -P)
else
if [ -n "$gitbase" ]; then
case $(git config remote.origin.url) in
*/aports) APORTSDIR=$gitbase ;;
case $(git remote get-url origin) in
# '.git' for SSH URLs, and no suffix for HTTPS URLs
*/aports|*/aports.git) APORTSDIR=$gitbase ;;
*) APORTSDIR= ;;
esac
else