Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Fabian42/bash_scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian42 committed Dec 18, 2023
2 parents 5e00235 + 4d781ad commit a29a429
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/temp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
echo "{"keywords":[" > temp.json
cat temp | sed -E "s/(^|[^\\\\\\n])((\\\\\\\\)*) *\\#.+/\\1\\2/;s/(.+)/ {\"keyword\":\"\\1\"},/" >> temp.json
echo "]}" > temp.json
echo "{\"keywords\":[" > temp.json
cat temp | sed -E "s/(^|[^\\\\\\n])((\\\\\\\\)*) *\\#.+/\\1\\2/;$ ! s/(.+)/ {\"keyword\":\"\\1\"},/;$ s/(.+)/ {\"keyword\":\"\\1\"}/;/^ *$/d" >> temp.json
echo >> temp.json
echo "]}" >> temp.json
git config --global user.name "Fabian42"
git config --global user.email "[email protected]"
git add .
Expand Down
2 changes: 1 addition & 1 deletion temp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ foo
\\# comment
\\\# hash
\\\\# comment
\\\\\# hash
\\\\\# hashtesting
11 changes: 11 additions & 0 deletions temp.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
{"keywords":[
<<<<<<< HEAD
=======
{"keyword":"test"},
{"keyword":"abc"},
{"keyword":"foo"},
{"keyword":"\# hash"},
{"keyword":"\\"},
{"keyword":"\\\# hash"},
{"keyword":"\\\\"},
{"keyword":"\\\\\# hashtesting"}
>>>>>>> 4d781ad2c9a562e693caf5d259f933c8c575ff21
]}

0 comments on commit a29a429

Please sign in to comment.