summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Aaron Goldberg2021-11-25 01:47:02 -0500
committerBen Aaron Goldberg2021-11-25 01:47:02 -0500
commit2d2b35ce85e1a8000611fce73885ba37f83348d7 (patch)
tree6da0cca447a2d3aa2ead6239b2bf361506b58a33
parent655d40261c63506327426ca0b4308fc0bc7ad699 (diff)
downloadaur-gemcert-git.tar.gz
Only create go module if it doesn't exist
Signed-off-by: Ben Aaron Goldberg <ben@benaaron.dev>
-rw-r--r--PKGBUILD6
1 files changed, 4 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 092f896e2ba4..7175e1fab6f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,8 +21,10 @@ pkgver() {
prepare() {
cd "$srcdir/gemcert"
mkdir -p build/
- go mod init "${url#https://}" # strip https:// from canonical URL
- go mod tidy
+ if [ ! -f go.mod ]; then
+ go mod init "${url#https://}" # strip https:// from canonical URL
+ go mod tidy
+ fi
}
build() {