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

Refactor2 #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Refactor2 #42

wants to merge 3 commits into from

Conversation

dportabella
Copy link
Contributor

refactoring.

  • all files synced to home directory (.dot files and bin and init) are moved to a files dir;
  • .dots file is renamed to setup.sh

setup.sh boostrap calls the bootstrap.ch script

calling bootstrap should sync this local dev-setup directory with the home directory; here it is not the place to call git pull.

@donnemartin
Copy link
Owner

Hi @dportabella, thanks for the pull request, I hope to check it out later this week.

@donnemartin
Copy link
Owner

@dportabella I think the meat of the changes look pretty good, thanks for putting this together. I'd prefer to not have the dotfiles be placed in a subdirectory files. I think we can just exclude *.sh from the rsync to the ~ folder.

Renaming .dots to setup.sh makes sense, but would require updates to the README. Maybe this can come in a second pass.

I'll add some comments inline to the PR.

function doIt() {
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
--exclude "README.md" --exclude "LICENSE" -avh --no-perms . ~;
rsync --exclude ".DS_Store" -avh --no-perms files ~;
Copy link
Owner

Choose a reason for hiding this comment

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

How about something like this?

#!/usr/bin/env bash

cd "$(dirname "${BASH_SOURCE}")";

function doIt() {
    rsync --exclude ".git/" \
          --exclude ".DS_Store" \
          --exclude "README.md" \
          --exclude "LICENSE" \
          --exclude "*.sh" \
          -avh --no-perms . ~;
    source ~/.bash_profile;
}

...

@dportabella
Copy link
Contributor Author

is there a reason why you prefer to not have the dotfiles (and other directories, such as bin and init) be placed in a subdirectory files?
I think that having these files mixed with all the rest makes things more complicated to use and understand. For instance, in my own custom branch, I do have another directory Filters that is meant to be copied at /Library/Filters/ (this allows Preview to choose the resolution when exporting to a PDF). So, then I need to modify bootstrap.ch to ignore also this directory.
Also, the .gitignore file in this git repository is misleading, as it is both used to copy itself to the user home directory, and it is used also as the .gitignore file of this repo.

Maybe we could rename this dir files to homefiles. Then, it is clear for everybody that bootstrap syncs this dir to the use home dir. we could even rename bootstrap.sh to sync_homefiles.sh to make it even more clear.

@donnemartin
Copy link
Owner

Hi @dportabella, sorry I thought I had replied to this awhile back, I just noticed that is not the case.

It is just a personal preference to have the .sh files in the root of dev-setup and be filtered out during the rsync to ~. Interesting how you've extended this further in your fork!

Curious if others also feel we should restructure the project a bit to add a files or a homefiles directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants