Skip to content

Commit

Permalink
Merge pull request #93 from nicolasbock/tags
Browse files Browse the repository at this point in the history
Tags
  • Loading branch information
nicolasbock authored Jul 30, 2017
2 parents d68fded + 89da5b5 commit 9f1d1cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 3 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TOP_DIR="${PWD}"
TOP_DIR="$(readlink --canonicalize-existing $(dirname "$0"))"
: ${BUILD_DIR:=${TOP_DIR}/build}
: ${INSTALL_DIR:=${TOP_DIR}/install}
LOG_FILE="${TOP_DIR}/build.log"
Expand Down Expand Up @@ -172,10 +172,8 @@ check_indent() {
}

tags() {
local basedir=$(git rev-parse --show-toplevel)
local files=$(git ls-files ${basedir}/*.{c,h,F90})
ctags --recurse --C-kinds=+lxzLp ${files}
etags ${files}
"${TOP_DIR}/update_tags.sh" 2>&1 | tee -a "${LOG_FILE}"
check_pipe_error
}

dist() {
Expand Down
8 changes: 8 additions & 0 deletions update_tags.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash


files=$(git ls-tree --full-tree -r HEAD \
| grep '.\(c\|h\|F90\)$' \
| awk '{print $4}')
ctags --recurse --C-kinds=+lxzLp --Fortran-kinds=+LP ${files}
etags ${files}

0 comments on commit 9f1d1cf

Please sign in to comment.