Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
long-910 committed Jan 11, 2024
1 parent 8315304 commit f7fdd0d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ 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:

# 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
6 changes: 4 additions & 2 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -21,3 +21,5 @@ jobs:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
ignore_names: dotfiles/.zshrc
2 changes: 2 additions & 0 deletions dotfiles/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions install_and_configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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)
Expand Down

0 comments on commit f7fdd0d

Please # to comment.