Prep work before we use the new setup

This commit is contained in:
Michael Campagnaro 2023-06-13 15:45:28 -04:00
parent c7845e62d9
commit 0ee1e7666e
11 changed files with 22 additions and 38 deletions

View File

@ -13,16 +13,20 @@ esac
export PLATFORM=$platform export PLATFORM=$platform
export PLATFORM_OS=$platform_os 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.common-pre" && . "$HOME/.env.common-pre"
test -f "$HOME/.env.private" && . "$HOME/.env.private" test -f "$HOME/.env.private" && . "$HOME/.env.private"
test -f "$HOME/.env.common-post" && . "$HOME/.env.common-post" test -f "$HOME/.env.common-post" && . "$HOME/.env.common-post"
test -f "$HOME/.aliases" && . "$HOME/.aliases" test -f "$HOME/.aliases" && . "$HOME/.aliases"
test -f "$HOME/.aliases.common" && . "$HOME/.aliases.common" test -f "$HOME/.aliases.common" && . "$HOME/.aliases.common"
test -f "$HOME/.aliases.private" && . "$HOME/.aliases.private" test -f "$HOME/.aliases.private" && . "$HOME/.aliases.private"
if [[ $_MC_SET_ENV_PATH -ne 1 ]]; then if [[ $_MC_SET_ENV_PATH -ne 1 ]]; then
test -d "$HOME/bin" && export PATH=$HOME/bin/:$PATH test -d "$HOME/bin" && export PATH=$HOME/bin/:$PATH
#TODO: remove this
test -d "$HOME/.dotfiles/bin" && export PATH=$HOME/.dotfiles/bin/:$PATH test -d "$HOME/.dotfiles/bin" && export PATH=$HOME/.dotfiles/bin/:$PATH
fi fi

View File

@ -1,5 +1,4 @@
[include] [include]
path = ~/.gitconfig.platform
path = ~/.gitconfig.private path = ~/.gitconfig.private
[init] [init]
defaultBranch = master defaultBranch = master
@ -7,11 +6,25 @@
summary = true summary = true
tool = vimdiff tool = vimdiff
[core] [core]
excludesfile = ~/.gitignore excludesfile = ~/.gitignore.global
hookspath = ~/.git_hooks hookspath = ~/.git_hooks
preloadindex = true preloadindex = true
fscache = true fscache = true
editor = vim 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] [push]
default = upstream default = upstream
[pull] [pull]

View File

@ -4,7 +4,7 @@ if [[ $(uname) == 'Darwin' ]]; then
if ! command -v brew &>/dev/null if ! command -v brew &>/dev/null
then then
# We need to update bash, so we'll start with setting up homebrew. # We need to update bash, so we'll start with setting up homebrew.
./osx/pre_install ./macos/pre_install
exit exit
fi fi
fi fi
@ -136,7 +136,7 @@ if [[ $is_windows -eq 1 ]]; then
setup_bash setup_bash
elif [[ $is_macos -eq 1 ]]; then elif [[ $is_macos -eq 1 ]]; then
printf "\n${BOLD}Setting up MacOS${NORMAL}\n\n" printf "\n${BOLD}Setting up MacOS${NORMAL}\n\n"
os_name="osx" os_name="macos"
setup_zsh setup_zsh
setup_bash setup_bash
use_shell zsh use_shell zsh

View File

@ -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

0
osx/install → macos/install Executable file → Normal file
View File

0
osx/pre_install → macos/pre_install Executable file → Normal file
View File

View File

@ -1,2 +0,0 @@
[code]
editor = /usr/bin/vim

View File

@ -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