-
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.
Merge branch 'main' into feature-build
- Loading branch information
Showing
9 changed files
with
137 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Lint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install ShellCheck | ||
run: sudo apt install -y shellcheck | ||
|
||
- name: Run ShellCheck | ||
run: shellcheck ./install.sh ./scripts/*.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,12 @@ | ||
name: macOS | ||
|
||
on: [push] | ||
|
||
jobs: | ||
macOS: | ||
name: macOS | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Setup | ||
run: curl -sL https://raw.githubusercontent.com/ShuN6211/dotfiles/refs/heads/main/install.sh | sh |
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,12 @@ | ||
#!/bin/sh | ||
INSTALL_DIR="${INSTALL_DIR:-$HOME/workspace/dotfiles}" | ||
|
||
if [ -d "$INSTALL_DIR" ]; then | ||
echo "Updating dotfiles..." | ||
git -C "$INSTALL_DIR" pull | ||
else | ||
echo "Installing dotfiles..." | ||
git clone https://github.com/ShuN6211/dotfiles.git "$INSTALL_DIR" | ||
fi | ||
|
||
/bin/bash "$INSTALL_DIR/scripts/setup.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,20 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
export CUR_DIR REPO_DIR | ||
CUR_DIR="$( | ||
cd "$(dirname "$0")" || exit 1 | ||
pwd | ||
)" | ||
REPO_DIR="$( | ||
cd "$(dirname "$0")/.." || exit 1 | ||
pwd | ||
)" | ||
|
||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" | ||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" | ||
export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" | ||
|
||
export DENO_INSTALL="${DENO_INSTALL:-$XDG_DATA_HOME/deno}" | ||
export RUSTUP_HOME="$XDG_DATA_HOME/rustup" | ||
export CARGO_HOME="$XDG_DATA_HOME/cargo" |
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,22 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
# shellcheck source=./scripts/common.bash | ||
source "$(dirname "$0")/common.bash" | ||
|
||
[ "$(uname)" != "Darwin" ] && exit | ||
[ -n "$SKIP_HOMEBREW" ] && exit | ||
|
||
if type brew >/dev/null; then | ||
echo "Homebrew is already installed." | ||
else | ||
echo "Installing Homebrew..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | ||
fi | ||
|
||
echo "Updating Homebrew..." | ||
brew update | ||
|
||
echo "Installing Homebrew apps..." | ||
brew bundle install --file "${REPO_DIR}/config/homebrew/Brewfile" --no-lock --verbose | ||
|
||
true |
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,24 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
# shellcheck source=./scripts/common.bash | ||
source "$(dirname "$0")/common.bash" | ||
|
||
if [[ ! -d "$HOME/.ssh" ]]; then | ||
mkdir -p "$HOME/.ssh" | ||
chmod 700 "$HOME/.ssh" | ||
fi | ||
|
||
if [[ ! -d "$HOME/.gnupg" ]]; then | ||
mkdir -p "$HOME/.gnupg" | ||
chmod 700 "$HOME/.gnupg" | ||
fi | ||
|
||
mkdir -p \ | ||
"$XDG_CONFIG_HOME" \ | ||
"$XDG_STATE_HOME" \ | ||
"$XDG_DATA_HOME/vim" | ||
|
||
ln -sfv "$REPO_DIR/config/"* "$XDG_CONFIG_HOME" | ||
ln -sfv "$XDG_CONFIG_HOME/zsh/.zshenv" "$HOME/.zshenv" | ||
ln -sfv "$XDG_CONFIG_HOME/editorconfig/.editorconfig" "$HOME/.editorconfig" | ||
ln -sfnv "$XDG_CONFIG_HOME/vim" "$HOME/.vim" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
# shellcheck source=./scripts/common.bash | ||
source "$(dirname "$0")/common.bash" | ||
|
||
[ -n "$SKIP_DENO" ] && exit | ||
|
||
echo "Installing Deno..." | ||
curl -fsSL https://deno.land/x/install/install.sh | /bin/sh | ||
|
||
echo "Install Deno completions..." | ||
mkdir -p "$XDG_DATA_HOME/zsh/completions" | ||
"$DENO_INSTALL/bin/deno" completions zsh >"$XDG_DATA_HOME/zsh/completions/_deno" |
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,9 @@ | ||
#!/usr/bin/env bash | ||
set -eux | ||
# shellcheck source=./scripts/common.bash | ||
source "$(dirname "$0")/common.bash" | ||
|
||
/bin/bash "$CUR_DIR/setup-homebrew.bash" | ||
/bin/bash "$CUR_DIR/setup-links.bash" | ||
/bin/bash "$CUR_DIR/setup-deno.bash" | ||
/bin/bash "$CUR_DIR/setup-sheldon.bash" |