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
Show file tree
Hide file tree
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
5 changes: 1 addition & 4 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

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

git pull origin master;

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;
}

...

source ~/.bash_profile;
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .dots → setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function runDots() {
echo "Syncing the dev-setup repo to your local machine."
echo "------------------------------"
echo ""
cd ~ && curl -#L https://github.com/donnemartin/dev-setup/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,LICENSE}
./bootstrap.sh
Copy link
Owner

Choose a reason for hiding this comment

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

I think we could update the echo description and use the --force flag to prevent the double confirmation prompt "This script may overwrite existing files in your home directory. Are you sure? (y/n)":

...
        if [ $ARG == "bootstrap" ] || [ $ARG == "all" ]; then
            echo ""
            echo "------------------------------"
            echo "Syncing the dev-setup dotfiles to your home directory."
            echo "------------------------------"
            echo ""
            ./bootstrap.sh --force
        fi
...

fi
if [ $ARG == "osxprep" ] || [ $ARG == "all" ]; then
# Run the osxprep.sh Script
Expand Down