Skip to content

Commit

Permalink
git: Extract user config, simplify updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fhemberger committed Mar 18, 2020
1 parent a4dfd00 commit 7080de6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions files/.gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# npm install -g diff-so-fancy
pager = diff-so-fancy | less --tabs=4 -RFX
attributesfile = ~/.gitattributes
[include]
path = ~/.gitconfig.local
[alias]
a = add
st = status
Expand Down
4 changes: 4 additions & 0 deletions files/.gitconfig.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[user]
name =
email =
signingkey =
4 changes: 2 additions & 2 deletions setup/dotfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ sudo chmod +x /usr/local/bin/diff-so-fancy
# Copy dotfiles to ~
echo "Copying dotfiles ..."
cp -r files/.zsh "$HOME"
cp files/{.colordiffrc,.gitignore_global,.inputrc,.zshrc} "$HOME"
cp -n files/.gitconfig "$HOME"
cp files/.{colordiffrc,gitconfig,gitignore_global,inputrc,zshrc} "$HOME"
cp -n files/.gitconfig.local "$HOME"
touch "$HOME/.extra"
7 changes: 1 addition & 6 deletions update.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
#!/bin/bash
set -euo pipefail

echo "Updating diff-so-fancy ..."
curl -sSo /usr/local/bin/diff-so-fancy https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy
chmod +x /usr/local/bin/diff-so-fancy

echo "Updating external zsh modules ..."
git submodule update --init --recursive --remote --depth=1
cp -r files/.zsh "$HOME"

# Refresh symlinks
setup/dotfiles.sh
setup/zsh.sh

0 comments on commit 7080de6

Please sign in to comment.