diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f920108..a31bd63 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -6,9 +6,9 @@ name: Linux on: # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -16,14 +16,14 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + linux-test: # The type of runner that the job will run on runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - # Runs install script - - name: Run install_and_configure.sh - run: ${GITHUB_WORKSPACE}/install_and_configure.sh + # Runs install script + - name: Run install_and_configure.sh + run: ${GITHUB_WORKSPACE}/install_and_configure.sh diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index e2701cd..64404d7 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -6,9 +6,9 @@ name: ShellCheck on: # Triggers the workflow on push or pull request events but only for the "main" branch push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -21,3 +21,5 @@ jobs: - uses: actions/checkout@v3 - name: Run ShellCheck uses: ludeeus/action-shellcheck@master + with: + ignore_names: dotfiles/.zshrc diff --git a/dotfiles/.tmux.conf b/dotfiles/.tmux.conf index 2f65030..7a1d57c 100644 --- a/dotfiles/.tmux.conf +++ b/dotfiles/.tmux.conf @@ -2,6 +2,8 @@ unbind C-b set -g prefix C-t +set-option -g default-shell /bin/zsh + ## Language Options # setw -g utf8 on # set -g status-utf8 on diff --git a/install_and_configure.sh b/install_and_configure.sh index 3f68425..228e2f5 100755 --- a/install_and_configure.sh +++ b/install_and_configure.sh @@ -31,9 +31,9 @@ show_status() { exit_on_error() { local exit_code=$1 local error_message=$2 - if [ $exit_code -ne 0 ]; then + if [ "$exit_code" -ne 0 ]; then echo -e "\033[1;31mError: $error_message\033[0m" - exit $exit_code + exit "$exit_code" fi } @@ -55,15 +55,15 @@ echo -e check_and_install() { package_name=$1 show_status "⚙️ Checking $package_name" - if command -v $package_name &> /dev/null; then + if command -v "$package_name" &> /dev/null; then installed_version=$($package_name --version) echo "✅ $package_name is already installed (Version: $installed_version)" else show_status "🔧 Installing $package_name" if [[ "$package_manager" == "brew" ]]; then - brew install $package_name + brew install "$package_name" else - sudo $package_manager install -y $package_name + sudo $package_manager install -y "$package_name" fi exit_on_error $? "Failed to install $package_name." installed_version=$($package_name --version)