-
Notifications
You must be signed in to change notification settings - Fork 385
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
Download only new hash files #242
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you've disabled commits for members, I cannot change that line. You have to delete
$1/
as the scriptscd
s into the directory before.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script does
cd
into$1/
, but when I'm checking the file names, the update performs twocut
commands, lopping off the directory assigned to$1
. A little convoluted, but it makes the comparison easier.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not what I wanted to say. You
cut
something off, that's right but it only affects the filename, after that you still have that commands:cd $1
if [ -e $1/$u ]
That leads to "being in" directory
$1
and checks if there's an directory$1
with file$u
in it. Or I'm completely blind and oversee something. :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prior to the
cd
, the scriptcut
s the full path twice, makingu
only the file name as pulled from the virusshare website, which it then compares to the filenames in directory$1
.See, e.g.
| cut -d\" -f2 | cut -d\/ -f2
in the update as opposed to onlycut -d\" -f2
in the original.The first cuts down to e.g. "hashes/VirusShare_00049.md5", the second lops off the directory on the hosting server and leaves only e.g. "VirusShare_00049.md5", which is then compared to the filename in
$1
.