Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
Update bug.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gvoze32 authored Jun 12, 2024
1 parent 08e79e0 commit 00a64ff
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ jobs:
cat hosts-hasilsorted | sudo tee -a hosts > /dev/null
- name: Remove Adjacent Empty Lines
run: |
awk '/(\.+$)/' hosts > hosts.tmp
mv hosts.tmp hosts
remove_adjacent_empty_lines() {
local file_path="$1"
local temp_file=$(mktemp)
awk 'NF || !p {print} {p = !NF}' "$file_path" > "$temp_file"
mv "$temp_file" "$file_path"
}
file_path='hosts'
remove_adjacent_empty_lines "$file_path"
- name: Commit changes
run: |
git config --global user.email "[email protected]"
Expand Down

0 comments on commit 00a64ff

Please sign in to comment.