summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Dietl <petedietl@gmail.com>2019-05-23 17:30:28 -0500
committerNatanael Copa <ncopa@alpinelinux.org>2019-09-30 10:35:01 +0000
commit7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61 (patch)
tree72a738971c3a0d2916d31ed37a558ca6bfd82683
parent6310405af8c5d91178524c212ead7755c16e70b3 (diff)
downloadabuild-7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61.tar.gz
abuild-7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61.tar.bz2
abuild-7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61.tar.xz
abuild-7a8b3a8e7d252d5e8393d032e70e3c1deedd8c61.zip
Allow for git remote url to end in aports.git, (i.e., allow SSH git remotes)
-rw-r--r--functions.sh.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/functions.sh.in b/functions.sh.in
index 22c2c49..fb474a5 100644
--- a/functions.sh.in
+++ b/functions.sh.in
@@ -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