diff --git a/env.loader b/env.loader index 0ebd4f1..1334f75 100644 --- a/env.loader +++ b/env.loader @@ -13,16 +13,20 @@ esac export PLATFORM=$platform export PLATFORM_OS=$platform_os -test -f "$HOME/.env.platform" && . "$HOME/.env.platform" +os_lower="${platform_os,,}" +test -f "$HOME/dotfiles/${os_lower}/env.platform" && . "$HOME/dotfiles/${os_lower}/env.platform" + test -f "$HOME/.env.common-pre" && . "$HOME/.env.common-pre" test -f "$HOME/.env.private" && . "$HOME/.env.private" test -f "$HOME/.env.common-post" && . "$HOME/.env.common-post" + test -f "$HOME/.aliases" && . "$HOME/.aliases" test -f "$HOME/.aliases.common" && . "$HOME/.aliases.common" test -f "$HOME/.aliases.private" && . "$HOME/.aliases.private" if [[ $_MC_SET_ENV_PATH -ne 1 ]]; then test -d "$HOME/bin" && export PATH=$HOME/bin/:$PATH + #TODO: remove this test -d "$HOME/.dotfiles/bin" && export PATH=$HOME/.dotfiles/bin/:$PATH fi diff --git a/gitconfig b/gitconfig index 753747b..2e8736f 100644 --- a/gitconfig +++ b/gitconfig @@ -1,5 +1,4 @@ [include] - path = ~/.gitconfig.platform path = ~/.gitconfig.private [init] defaultBranch = master @@ -7,11 +6,25 @@ summary = true tool = vimdiff [core] - excludesfile = ~/.gitignore + excludesfile = ~/.gitignore.global hookspath = ~/.git_hooks preloadindex = true fscache = true editor = vim + # I used to have this set to true, which would result in checked out files + # being converted to CRLF line endings and commits converting to LF. I'm + # tired of this conversion shit though so I'm turning it off and will be + # enforcing LF line endings via a combination of editorconfig and + # gitattribute files on a per-project basis. This should make sure that + # anyone contributing to my projects will be committing LF line endings. + # The only exception is that the gitattributes files will commit batch + # files with CRLF to avoid Windows glitches. + # + # I used these posts for reference: + # https://markentier.tech/posts/2021/10/autocrlf-true-considered-harmful/ + # https://troyready.com/blog/git-windows-dont-convert-line-endings.html + # + autocrlf = false [push] default = upstream [pull] diff --git a/install b/install index fdc87dd..c412e5b 100755 --- a/install +++ b/install @@ -4,7 +4,7 @@ if [[ $(uname) == 'Darwin' ]]; then if ! command -v brew &>/dev/null then # We need to update bash, so we'll start with setting up homebrew. - ./osx/pre_install + ./macos/pre_install exit fi fi @@ -136,7 +136,7 @@ if [[ $is_windows -eq 1 ]]; then setup_bash elif [[ $is_macos -eq 1 ]]; then printf "\n${BOLD}Setting up MacOS${NORMAL}\n\n" - os_name="osx" + os_name="macos" setup_zsh setup_bash use_shell zsh diff --git a/linux/gitconfig.platform b/linux/gitconfig.platform deleted file mode 100644 index 7049ef1..0000000 --- a/linux/gitconfig.platform +++ /dev/null @@ -1,14 +0,0 @@ -[code] - editor = vim -[core] - # Don't change any line endings. That means if a file has CRLF line endings - # the carriage return will stay. I'm only worknig with LF line endings on - # Windows now except for .bat files which are forced to have CRLF via - # per-project editorconfig and gitattribute files. I want those files to - # still have CRLFs when modified on Linux. - # - # I used these posts for reference: - # https://markentier.tech/posts/2021/10/autocrlf-true-considered-harmful/ - # https://troyready.com/blog/git-windows-dont-convert-line-endings.html - # - autocrlf = false diff --git a/osx/README.md b/macos/README.md similarity index 100% rename from osx/README.md rename to macos/README.md diff --git a/osx/capslock-to-ctrl-for-karabiner.json b/macos/capslock-to-ctrl-for-karabiner.json similarity index 100% rename from osx/capslock-to-ctrl-for-karabiner.json rename to macos/capslock-to-ctrl-for-karabiner.json diff --git a/osx/env.platform b/macos/env.platform similarity index 100% rename from osx/env.platform rename to macos/env.platform diff --git a/osx/install b/macos/install old mode 100755 new mode 100644 similarity index 100% rename from osx/install rename to macos/install diff --git a/osx/pre_install b/macos/pre_install old mode 100755 new mode 100644 similarity index 100% rename from osx/pre_install rename to macos/pre_install diff --git a/osx/gitconfig.platform b/osx/gitconfig.platform deleted file mode 100644 index 58ab4f2..0000000 --- a/osx/gitconfig.platform +++ /dev/null @@ -1,2 +0,0 @@ -[code] - editor = /usr/bin/vim diff --git a/windows/gitconfig.platform b/windows/gitconfig.platform deleted file mode 100644 index 77a04dc..0000000 --- a/windows/gitconfig.platform +++ /dev/null @@ -1,17 +0,0 @@ -[code] - editor = /usr/bin/vim -[core] - # I used to have this set to true, which would result in checked out files - # being converted to CRLF line endings and commits converting to LF. I'm - # tired of this conversion shit though so I'm turning it off and will be - # enforcing LF line endings via a combination of editorconfig and - # gitattribute files on a per-project basis. This should make sure that - # anyone contributing to my projects will be committing LF line endings. - # The only exception is that the gitattributes files will commit batch - # files with CRLF to avoid Windows glitches. - # - # I used these posts for reference: - # https://markentier.tech/posts/2021/10/autocrlf-true-considered-harmful/ - # https://troyready.com/blog/git-windows-dont-convert-line-endings.html - # - autocrlf = false