Last active
September 2, 2021 18:05
-
-
Save dvinciguerra/fb63bbdc8ae2314e82383cff63b0ab9e to your computer and use it in GitHub Desktop.
up.sh - how I maintain my dotfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e -o pipefail | |
| # constants | |
| ROOT_DIR="$(pwd)" | |
| HOME_DIR="$HOME" | |
| function create_directory { | |
| local directory_path="$1" | |
| if [[ ! -e "$directory_path" ]]; then | |
| mkdir -p "$directory_path" | |
| fi | |
| } | |
| function create_symlink { | |
| local source_path="$1" | |
| local destination_path="$2" | |
| ln -sf "${ROOT_DIR}/config/${source_path}" "$destination_path" | |
| } | |
| function dotfile { | |
| local file="$1" | |
| local file_path="${HOME}/$(dirname "$file")" | |
| create_directory "$file_path" | |
| create_symlink "$file" "${HOME}/${file}" | |
| } | |
| # alacritty | |
| dotfile '.config/alacritty/alacritty.yml' | |
| # ag | |
| dotfile '.agrc' | |
| # pgcli | |
| dotfile '.config/pgcli/config' | |
| # htop | |
| dotfile '.config/htop/htoprc' | |
| # ranger | |
| dotfile '.config/ranger/rc.conf' | |
| # colorls | |
| dotfile '.config/colorls/dark_colors.yaml' | |
| dotfile '.config/colorls/dark_colors_nord.yaml' | |
| # bat | |
| dotfile '.config/bat/config' | |
| # peco | |
| dotfile '.config/peco/config.json' | |
| # git | |
| dotfile '.gitconfig' | |
| dotfile '.gitignore' | |
| dotfile '.config/git/commit/template.sample' | |
| dotfile '.config/git/hooks/commit-msg.sample' | |
| dotfile '.config/git/hooks/pre-rebase.sample' | |
| dotfile '.config/git/hooks/pre-commit.sample' | |
| dotfile '.config/git/hooks/applypatch-msg.sample' | |
| dotfile '.config/git/hooks/fsmonitor-watchman.sample' | |
| dotfile '.config/git/hooks/pre-receive.sample' | |
| dotfile '.config/git/hooks/prepare-commit-msg.sample' | |
| dotfile '.config/git/hooks/post-update.sample' | |
| dotfile '.config/git/hooks/pre-merge-commit.sample' | |
| dotfile '.config/git/hooks/pre-applypatch.sample' | |
| dotfile '.config/git/hooks/pre-commit' | |
| dotfile '.config/git/hooks/pre-push.sample' | |
| dotfile '.config/git/hooks/update.sample' | |
| # ctags | |
| dotfile '.ctags.d/config.ctags' | |
| # tmux | |
| dotfile '.tmux.conf' | |
| dotfile '.tmux/tmux.remote.conf' | |
| dotfile '.tmux/renew_env.sh' | |
| # gpg | |
| dotfile '.gnupg/gpg-agent.conf' | |
| # curl | |
| dotfile '.curlrc' | |
| # zsh | |
| dotfile '.zshrc' | |
| dotfile '.zshenv' | |
| dotfile '.inputrc' | |
| dotfile '.aliases' | |
| # tools & scripts | |
| dotfile '.doingrc' | |
| dotfile '.local/bin/pmenu' | |
| dotfile '.local/bin/svelte' | |
| dotfile '.local/bin/term' | |
| dotfile '.local/bin/rails-minimal' | |
| dotfile '.local/bin/cotacoes' | |
| dotfile '.local/bin/textfaces' | |
| dotfile '.local/bin/dict' | |
| dotfile '.local/bin/lorem' | |
| dotfile '.local/bin/diff-so-fancy' | |
| dotfile '.local/bin/uri_escape' | |
| dotfile '.local/bin/json_formatter' | |
| dotfile '.local/bin/gravatar' | |
| dotfile '.local/bin/memcheck' | |
| dotfile '.local/bin/daily-report' | |
| # ruby | |
| dotfile '.gemrc' | |
| dotfile '.railsrc' | |
| dotfile '.irbrc' | |
| dotfile '.rubocop.yml' | |
| # development | |
| dotfile '.editorconfig' | |
| dotfile '.eslintrc.js' | |
| dotfile '.coffeelint.json' | |
| dotfile '.scss-lint.yml' | |
| dotfile '.pryrc' | |
| dotfile '.perltidyrc' | |
| # network | |
| dotfile '.ssh/config' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment