Skip to content

Commit

Permalink
Improve install.sh, add macos runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Jendker committed Aug 12, 2024
1 parent 05d4b7c commit 3719225
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
os: ["ubuntu-latest", "macos-latest"]

steps:
- name: Checkout repository
Expand All @@ -25,5 +25,10 @@ jobs:
- name: Run setup
run: |
./install.sh
./set_up_debian.sh
./set_up_debian_dev.sh --optional
if [[ "$RUNNER_OS" == "Linux" ]]; then
./set_up_debian.sh
./set_up_debian_dev.sh --optional
elif [[ "$RUNNER_OS" == "macOS" ]]; then
./macos/install.sh
./macos/set_defaults.sh --optional
fi
7 changes: 1 addition & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

copy=false
dev=false
if [[ $1 == "--copy" ]]; then
copy=true
elif [[ $1 == "--dev" ]]; then
dev=true
fi

function add() {
Expand All @@ -23,15 +20,13 @@ function add() {
}

# nvim
config_folder="$HOME/.config/nvim"
add "$SCRIPT_DIR/nvim" "$HOME/.config/nvim"

# clangd
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
add "$SCRIPT_DIR/clangd" "$HOME/.config/clangd"
elif [[ "$OSTYPE" == "darwin"* ]]; then
copy=true
add "$SCRIPT_DIR/clangd" "/Users/jedrzej/Library/Mobile Documents/com~apple~CloudDocs/Mackup/Library/Preferences/clangd/"
add "$SCRIPT_DIR/clangd" "$HOME/Library/Preferences/clangd/"
else
echo "OS type unknown. Exiting."
exit 1
Expand Down

0 comments on commit 3719225

Please sign in to comment.