Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD: separate macos and windows dotfiles setting file #36

Merged
merged 5 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run
run: make
run: cd macos && make
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
# dotfiles

## macos

```bash
make
```

## windows

When setup, you need open git bash via auth of admin!!!

```bat
./init.bat
```

```bash
make NAME=`<git, user.name>` EMAIL=`<git, user.email>`
```

File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion install_playbook.yml → macos/install_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
roles:
- homebrew
- vim
- lima

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions windows/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
NAME:=
EMAIL:=

.PHONY: setup
setup:
./setup.sh ${NAME} ${EMAIL}

1 change: 1 addition & 0 deletions windows/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export MSYS=winsymlinks:nativestrict
7 changes: 7 additions & 0 deletions windows/gitconfig_addon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[alias]
lg = log --graph --date=short --format='%C(yellow)%h%C(reset)%C(magenta) [%ad]%C(reset)%C(auto)%d%C(reset) %s%C(cyan) @%an%C(reset)'
st = status
[core]
quotepath = false
[init]
defaultBranch = main
2 changes: 2 additions & 0 deletions windows/init.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
winget install Git.Git koalaman.shellcheck ezwinports.make
pause
16 changes: 16 additions & 0 deletions windows/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash -eux

# region enable symlink
export MSYS=winsymlinks:nativestrict
rm -rf ~/.bashrc
ln -s "$(pwd)/bashrc" ~/.bashrc
# endregion

# region git setting
cp -f gitconfig_addon ~/.gitconfig
git config --global core.symlinks true
git config --global user.name $1
git config --global user.email $2
cat ~/.gitconfig
# endregion

Loading