# GDB script to create web ARI page directly from within gdb/ari directory.
#
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2019 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
# Use 'branch' subdir name if Tag contains branch
if [ -f "${srcdir}/gdb/CVS/Tag" ] ; then
tagname=`cat "${srcdir}/gdb/CVS/Tag"`
+ elif [ -d "${srcdir}/.git" ] ; then
+ tagname=`cd ${srcdir} && git rev-parse --abbrev-ref HEAD`
+ if test "$tagname" = "master"; then
+ tagname=trunk
+ fi
else
tagname=trunk
fi
fi
# Launch update-web-ari.sh in same directory as current script.
-${scriptpath}/update-web-ari.sh ${srcdir} ${tempdir} ${webdir} gdb
+${SHELL} ${scriptpath}/update-web-ari.sh ${srcdir} ${tempdir} ${webdir} gdb
if [ -f "${webdir}/index.html" ] ; then
echo "ARI output can be viewed in file \"${webdir}/index.html\""