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

Updates for "dump diff" script. #2347

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Updates for "dump diff" script. #2347

merged 3 commits into from
Dec 12, 2024

Conversation

larsbrinkhoff
Copy link
Member

  • Some cleanup/refactoring.
  • Output an xfile to delete files that were removed between the two tapes.
  • Make it posixier.

Copy link
Member

@eswenson1 eswenson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not having much luck on macOS with this version of dump-diff.sh. I'm getting:

/Users/eswenson/ITS/ws/its/build/dump-diff.sh: line 98: !: command not found
/Users/eswenson/ITS/ws/its/build/dump-diff.sh: line 98: !: command not found
/Users/eswenson/ITS/ws/its/build/dump-diff.sh: line 98: !: command not found
/Users/eswenson/ITS/ws/its/build/dump-diff.sh: line 98: !: command not found
/Users/eswenson/ITS/ws/its/build/dump-diff.sh: line 98: !: command not found
head: illegal line count -- -1
?Open failure: No such file or directory
?Open failure: No such file or directory

This is after having shown me a bunch of NEW FILEs.

@atsampson
Copy link
Contributor

That \! on line 98 should just be !.

@eswenson1
Copy link
Member

Yes, I found that, removed the \ and got this:

REMOVED FILE: jtw.mail
REMOVED FILE: map.mail
REMOVED FILE: first.999999
REMOVED FILE: sigsub.999999
REMOVED FILE: switch.999999
head: illegal line count -- -1
xargs: unterminated quote
?Open failure: No such file or directory

What does a line count of -1 mean? Should that be 1? Did someone try to convert -1 to -n 1?

@eswenson1
Copy link
Member

I changed the head lines to:

head -n 1 "$diffs" | xargs itstar cvf "$tap"
tail -n 2 "$diffs" | xargs itstar rvf "$tap"

And now the script runs to completion.

Copy link
Member

@eswenson1 eswenson1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the \ before the ! in line 98. Please fix the "head" command to not specify a negative line offset. No need for the +2 in the tail request -- just 2 is sufficient.

@larsbrinkhoff
Copy link
Member Author

larsbrinkhoff commented Dec 12, 2024

Thanks for checking on mac. I fixed if \! and head -n -1. Negative on the tail -n +2: +2 means something else than just 2.

@larsbrinkhoff larsbrinkhoff merged commit 4a42d94 into master Dec 12, 2024
14 checks passed
@larsbrinkhoff larsbrinkhoff deleted the lars/dump-diff branch December 12, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants