Skip to content

Commit

Permalink
Merge pull request #36 from Iovesophy/feature/windows
Browse files Browse the repository at this point in the history
ADD: separate macos and windows dotfiles setting file
  • Loading branch information
Iovesophy authored Jul 28, 2024
2 parents caa7daf + 7c00c1f commit 7889c86
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 2 deletions.
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

0 comments on commit 7889c86

Please sign in to comment.