[asterisk-commits] dlee: branch dlee/swagger-ui r401118 - in /team/dlee/swagger-ui: ./ contrib/s...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 17 09:34:37 CDT 2013


Author: dlee
Date: Thu Oct 17 09:34:35 2013
New Revision: 401118

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401118
Log:
Script for installing swagger-ui into static-http

Added:
    team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh   (with props)
Modified:
    team/dlee/swagger-ui/Makefile
    team/dlee/swagger-ui/static-http/   (props changed)

Modified: team/dlee/swagger-ui/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/dlee/swagger-ui/Makefile?view=diff&rev=401118&r1=401117&r2=401118
==============================================================================
--- team/dlee/swagger-ui/Makefile (original)
+++ team/dlee/swagger-ui/Makefile Thu Oct 17 09:34:35 2013
@@ -437,12 +437,15 @@
 
 datafiles: _all doc/core-en_US.xml
 	CFLAGS="$(_ASTCFLAGS) $(ASTCFLAGS)" build_tools/mkpkgconfig "$(DESTDIR)$(libdir)/pkgconfig";
-# Should static HTTP be installed during make samples or even with its own target ala
-# webvoicemail?  There are portions here that *could* be customized but might also be
-# improved a lot.  I'll put it here for now.
-
-	for x in static-http/*; do \
-		$(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/static-http" ; \
+
+#	# Recursively install contents of the static-http directory, in case
+#	# extra content is provided there. See contrib/scripts/get_swagger_ui.sh
+	find static-http | while read x; do \
+		if test -d $$x; then \
+			$(INSTALL) -m 755 -d "$(DESTDIR)$(ASTDATADIR)/$$x"; \
+		else \
+			$(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/$$x" ; \
+		fi \
 	done
 	$(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
 	$(INSTALL) -m 644 doc/snapshots.xslt "$(DESTDIR)$(ASTDATADIR)/static-http";

Added: team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh
URL: http://svnview.digium.com/svn/asterisk/team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh?view=auto&rev=401118
==============================================================================
--- team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh (added)
+++ team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh Thu Oct 17 09:34:35 2013
@@ -1,0 +1,36 @@
+#!/bin/sh
+
+#
+# Downloads Swagger-UI to put in static-http.
+#
+# Swagger-UI is a Swagger compliant HTML+JavaScript web app, which can be used
+# to browse ARI (Asterisk REST Interface).
+#
+
+PROGNAME=$(basename $0)
+
+: ${GIT:=git}
+: ${REPO:=https://github.com/leedm777/swagger-ui.git}
+: ${BRANCH:=asterisk}
+
+if ! test -d static-http; then
+    echo "${PROGNAME}: Must run from Asterisk source directory" >&2
+    exit 1
+fi
+
+set -ex
+
+CLONE_DIR=$(mktemp -d /tmp/swagger-ui.XXXXXX) || exit 1
+trap "rm -rf ${CLONE_DIR}" EXIT
+
+${GIT} clone -q -b ${BRANCH} ${REPO} ${CLONE_DIR}
+
+rm -rf static-http/swagger-ui
+cp -a ${CLONE_DIR}/dist static-http/swagger-ui
+
+cat <<EOF
+Swagger-UI downloaded. Install using 'make install'.
+
+To use, enable  ARI (ari.conf), the HTTP server (http.conf) and static
+content (also http.conf).
+EOF

Propchange: team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/dlee/swagger-ui/contrib/scripts/get_swagger_ui.sh
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: team/dlee/swagger-ui/static-http/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 17 09:34:35 2013
@@ -1,0 +1,1 @@
+swagger-ui




More information about the asterisk-commits mailing list