Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions plat/unix/update_tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ if [ "$1" != "" ]; then
exit 1
fi

# Redirect output to log file
if [ "$LOG_FILE" != "" ]; then
exec 1<&-
exec 2<&-
exec 1<>$LOG_FILE
exec 2>&1
fi

echo "Locking tags file..."
echo $$ > "$TAGS_FILE.lock"

Expand All @@ -98,8 +106,7 @@ INDEX_WHOLE_PROJECT=1
if [ -f "$TAGS_FILE" ]; then
if [ "$UPDATED_SOURCE" != "" ]; then
echo "Removing references to: $UPDATED_SOURCE"
tab=" "
cmd="grep --text -Ev '^[^$tab]+$tab$UPDATED_SOURCE$tab' '$TAGS_FILE' > '$TAGS_FILE.temp'"
cmd="grep --text -Ev '^[[:alnum:]_]+[[:space:]]$UPDATED_SOURCE[[:space:]]' '$TAGS_FILE' > '$TAGS_FILE.temp'"
echo "$cmd"
eval "$cmd" || true
INDEX_WHOLE_PROJECT=0
Expand Down