Skip to content

Commit

Permalink
Refactor tags command into separate script
Browse files Browse the repository at this point in the history
The `tags` command is not a separate script.
  • Loading branch information
nicolasbock committed Jul 29, 2017
1 parent 98dfa45 commit 89da5b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 2 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
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 89da5b5

Please sign in to comment.