-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: create shellcheck workflow feat: add init install script chore: update settings
- Loading branch information
1 parent
d6bb0de
commit fd5f3ed
Showing
5 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ on: pull_request | |
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: ShellCheck | ||
on: pull_request | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- uses: ludeeus/action-shellcheck@master |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# dotfiles | ||
# dotfiles | ||
|
||
This repository exists to manage my dotfiles and bootstrap my workstation. | ||
|
||
## Init | ||
|
||
On a brand new machine launch this script : | ||
|
||
```sh | ||
curl -fsSL https://raw.githubusercontent.com/mehdicopter/dotfiles/main/install.sh | bash | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
set -eufo pipefail | ||
|
||
# Update Macbook | ||
read -r -n 1 -s -p $'Do you want to update your MacBook (y/n)? \n' answer | ||
|
||
case $answer in | ||
y|Y) | ||
echo "" | ||
echo $'๐ Updating MacBook\n' | ||
sudo softwareupdate --install --all --restart | ||
;; | ||
*) | ||
echo "" | ||
echo "๐ธ Skipped MacBook update" | ||
;; | ||
esac | ||
|
||
export PATH=/opt/homebrew/bin:$PATH | ||
|
||
# Install Homebrew | ||
command -v brew >/dev/null 2>&1 || \ | ||
(echo "๐บ Installing Homebrew" && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") | ||
|
||
# Install Oh My Zsh | ||
if [ ! -f ~/.oh-my-zsh/oh-my-zsh.sh ]; then | ||
(echo "๐พ Installing oh-my-zsh" && yes | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)") | ||
fi | ||
|
||
# Install chezmoi | ||
command -v chezmoi >/dev/null 2>&1 || \ | ||
(echo "๐ Installing chezmoi" && brew install chezmoi) | ||
|
||
if [ -d "$HOME/.local/share/chezmoi/.git" ]; then | ||
echo "" | ||
echo "๐ธ chezmoi already initialized" | ||
echo " Reinitialize with: 'chezmoi init https://github.com/mehdicopter/dotfiles.git'" | ||
else | ||
echo "" | ||
echo "๐ Initializing dotfiles" | ||
chezmoi init --apply https://github.com/mehdicopter/dotfiles.git | ||
fi | ||
|
||
echo "" | ||
echo "Done." |