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

buildsuite: create more special files #48

Closed
wants to merge 1 commit into from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Dec 25, 2015

No description provided.

@rpdelaney
Copy link
Collaborator

I'm disinclined to be hard-coding filenames except for specific purposes. Currently we do this to test the representation of files with various attributes; but for the rest, there's already a loop to generate files from the file LS_COLORS. So why don't we just add these there?

@blueyed
Copy link
Contributor Author

blueyed commented Dec 26, 2015

Which loop?
There is one for extensions only.
We could have the same for filenames, but then duplicates (with the same attributes) should be skipped probably.

@rpdelaney
Copy link
Collaborator

Starts on line 118.

@blueyed
Copy link
Contributor Author

blueyed commented Dec 26, 2015

Ah, missed the part where it created the files (https://github.com/trapd00r/LS_COLORS/pull/48/files#diff-bcff1978c9626f0cdd3b6949935d365dL125).

@blueyed blueyed closed this Dec 26, 2015
@blueyed blueyed deleted the buildsuite-more-files branch December 26, 2015 21:31
@blueyed
Copy link
Contributor Author

blueyed commented Dec 26, 2015

What do you think about naming them e.g. README instead of test.README?
And then move them one dir up (into the root)?

@rpdelaney
Copy link
Collaborator

It will touch test.extension if and only if the file type starts with a dot .. Otherwise, it will simply touch extension. Therefore "README" should get generated correctly.

I admit that I could have done a better job commenting this script.

@blueyed
Copy link
Contributor Author

blueyed commented Dec 26, 2015

It will replace the * with e.g. README with a .:

line="${line//\*/.}"
if [[ "${line:0:1}" == "." ]]; then

Therefore it creates test.README.

@rpdelaney rpdelaney self-assigned this Dec 26, 2015
@rpdelaney
Copy link
Collaborator

You're right. I'll see if I can improve that.

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.

None yet

2 participants