Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually use the log file, fixed bad update grep (UNIX) #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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