From 4e1e1a9561a0a4d2c8f7c458dc708c1507286f09 Mon Sep 17 00:00:00 2001 From: edoapra Date: Fri, 7 Jul 2023 11:49:18 -0700 Subject: [PATCH] stubbing when gitlab is down --- src/nwc_columbus/GNUmakefile | 11 ++++++++++- src/nwc_columbus/check_gitlab.sh | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 src/nwc_columbus/check_gitlab.sh diff --git a/src/nwc_columbus/GNUmakefile b/src/nwc_columbus/GNUmakefile index be7733d1e8..7ef21096d8 100644 --- a/src/nwc_columbus/GNUmakefile +++ b/src/nwc_columbus/GNUmakefile @@ -1,6 +1,15 @@ # $Id$ - +# check gitlab connectivity +GITLAB_UP := $(shell ./check_gitlab.sh 2> /dev/null) +ifndef GITLAB_UP +$(info cannot download from gitlab) +$(info stubbing nwc_columbus module) +OBJ = sifs_stubs.o +LIBRARY = libnwc_columbus.a +else +$(info gitlab connectivity OK) SUBDIRS = sifs aoints +endif include ../config/makefile.h include ../config/makelib.h diff --git a/src/nwc_columbus/check_gitlab.sh b/src/nwc_columbus/check_gitlab.sh new file mode 100755 index 0000000000..64c131f76d --- /dev/null +++ b/src/nwc_columbus/check_gitlab.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +rm -f o.tgz +wget -O o.tgz https://gitlab.com/api/v4/projects/36816383/repository/archive?path=Columbus/source/colib 2> /dev/null +gzip -d -t o.tgz +if [ "$?" -eq 0 ]; then + echo OK +fi