diff --git a/.config/zsh/update-completions.sh b/.config/zsh/update-completions.sh index 20e27e7..d5f4287 100755 --- a/.config/zsh/update-completions.sh +++ b/.config/zsh/update-completions.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env zsh +#!/usr/bin/env bash # Update shell completions for installed tools # This script should be run after installing or updating tools diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4328c83..f9af08a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,4 +21,5 @@ jobs: uses: ludeeus/action-shellcheck@2.0.0 with: scandir: './bin' + ignore_names: '*.md' additional_files: '.config/shell/common-profile.sh .config/zsh/update-completions.sh' diff --git a/bin/git-repo-checker b/bin/git-repo-checker index bb89be3..eb0bf21 100755 --- a/bin/git-repo-checker +++ b/bin/git-repo-checker @@ -79,7 +79,8 @@ is_git_repo() { # Function to check for uncommitted changes check_uncommitted_changes() { local dir="$1" - local repo_name=$(basename "$dir") + local repo_name + repo_name=$(basename "$dir") cd "$dir" @@ -123,10 +124,12 @@ check_unpushed_commits() { cd "$dir" # Get current branch - local current_branch=$(git rev-parse --abbrev-ref HEAD) + local current_branch + current_branch=$(git rev-parse --abbrev-ref HEAD) # Check if branch has upstream - local upstream=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "") + local upstream + upstream=$(git rev-parse --abbrev-ref --symbolic-full-name "@{u}" 2>/dev/null || echo "") if [[ -z "$upstream" ]]; then echo -e "${YELLOW} ⚠️ No upstream branch set for '$current_branch'${NC}" @@ -134,7 +137,8 @@ check_unpushed_commits() { fi # Check for unpushed commits - local unpushed_count=$(git rev-list --count HEAD ^"$upstream" 2>/dev/null || echo "0") + local unpushed_count + unpushed_count=$(git rev-list --count HEAD ^"$upstream" 2>/dev/null || echo "0") if [[ "$unpushed_count" -gt 0 ]]; then echo -e "${YELLOW} ⚠️ $unpushed_count unpushed commit(s) on '$current_branch'${NC}" @@ -151,7 +155,8 @@ check_unpushed_commits() { # Function to process a single repository process_repo() { local dir="$1" - local repo_name=$(basename "$dir") + local repo_name + repo_name=$(basename "$dir") echo -e "${BLUE}📁 $repo_name${NC}" diff --git a/bin/provision b/bin/provision index 7149765..5fae3fa 100755 --- a/bin/provision +++ b/bin/provision @@ -77,7 +77,7 @@ ANSIBLE_CMD=( # Add optional arguments [[ -n "$ASK_BECOME_PASS" ]] && ANSIBLE_CMD+=("$ASK_BECOME_PASS") -[[ -n "$SETUP_ONLY" ]] && ANSIBLE_CMD+=($SETUP_ONLY) +[[ -n "$SETUP_ONLY" ]] && ANSIBLE_CMD+=("$SETUP_ONLY") [[ ${#REMAINING_ARGS[@]} -gt 0 ]] && ANSIBLE_CMD+=("${REMAINING_ARGS[@]}") # Run the Ansible playbook