add new install.sh and update README
This commit is contained in:
55
README.md
55
README.md
@@ -10,59 +10,14 @@ Welcome to my world.
|
|||||||
+ git configuration
|
+ git configuration
|
||||||
+ osx configuration
|
+ osx configuration
|
||||||
+ Node.js setup (nvm)
|
+ Node.js setup (nvm)
|
||||||
+ Homebrew files (Brewfile)
|
+ Homebrew files (Brewfile.sh)
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
### Automatic Installation
|
1. `git clone https://github.com/nicknisi/dotfiles.git ~/.dotfiles`
|
||||||
|
1. `cd ~/.dotfiles`
|
||||||
|
1. `./install.sh`
|
||||||
|
|
||||||
curl -L https://raw.github.com/nicknisi/dotfiles/master/tools/install.sh | sh
|
|
||||||
|
|
||||||
### Manual Installation
|
|
||||||
|
|
||||||
#### Clone
|
|
||||||
|
|
||||||
First, clone the repository to your home directory and name it ".dotfiles"
|
|
||||||
|
|
||||||
git clone git@github.com:nicknisi/dotfiles.git ~/.dotfiles
|
|
||||||
|
|
||||||
Then cd into that directory
|
|
||||||
|
|
||||||
cd ~/.dotfiles
|
|
||||||
|
|
||||||
#### Init Submodules
|
|
||||||
|
|
||||||
The vim configuration relies on a couple of vim plugins, which are loaded in as git submodules.
|
|
||||||
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
|
|
||||||
#### Backup
|
|
||||||
|
|
||||||
A backup task is included. This will find all the files that will be replaced and make a backup of them. For example, if you currently have a ".zshrc" file, it will be moved to ".zshrc.backup"
|
|
||||||
|
|
||||||
rake backup
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
|
|
||||||
Symlink the necessary files. The task will perform a search for all files in the *.dotfiles* directory that have the ".symlink" suffix and create a symbolic link in the home directory that drops the suffix and prefixes with a '.'
|
|
||||||
|
|
||||||
rake install
|
|
||||||
|
|
||||||
## Uninstall
|
|
||||||
|
|
||||||
If you would like to bring back your previous configuration, run the uninstalll task. This will remove the created symlinks.
|
|
||||||
|
|
||||||
#### Uninstall
|
|
||||||
|
|
||||||
rake uninstall
|
|
||||||
|
|
||||||
#### Restore
|
|
||||||
|
|
||||||
Then, if you would like to restore your previous configuration, run the restore task.
|
|
||||||
|
|
||||||
rake restore
|
|
||||||
|
|
||||||
## ZSH Plugins
|
## ZSH Plugins
|
||||||
|
|
||||||
By default, the *.zshrc* file will source any file within `.dotfiles/zsh` that has the *".zsh"* suffix.
|
By default, the `.zshrc` file will source any file within `.dotfiles/zsh` that have the `.zsh` extension.
|
||||||
|
|||||||
35
install.sh
Executable file
35
install.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "installing dotfiles"
|
||||||
|
|
||||||
|
echo "initializing submodule(s)"
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
echo "creating symlinks"
|
||||||
|
linkables=$( ls -1 -d **/*.symlink )
|
||||||
|
for file in $linkables ; do
|
||||||
|
target="$HOME/.$( basename $file ".symlink" )"
|
||||||
|
echo "creating symlink for $file"
|
||||||
|
ln -s $file $target
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
echo "running on OSX"
|
||||||
|
|
||||||
|
echo "installing homebrew"
|
||||||
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
|
||||||
|
echo "brewing all the things"
|
||||||
|
source scripts/brew.sh
|
||||||
|
|
||||||
|
echo "updating OSX settings"
|
||||||
|
source scripts/osx.sh
|
||||||
|
|
||||||
|
echo "installing node (from nvm)"
|
||||||
|
nvm install stable
|
||||||
|
nvm alias default stable
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echo "configuring zsh as default shell"
|
||||||
|
chsh -s $(which zsh)
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
echo "cloning repo to ~/.dotfiles"
|
|
||||||
git clone git@github.com:nicknisi/dotfiles.git ~/.dotfiles
|
|
||||||
cd ~/.dotfiles
|
|
||||||
echo "initializing git submodules"
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
echo "running backup"
|
|
||||||
rake backup
|
|
||||||
echo "creating symlinks"
|
|
||||||
rake install
|
|
||||||
Reference in New Issue
Block a user