Skip to content

Commit

Permalink
Address minor shell script linter warnings
Browse files Browse the repository at this point in the history
And make a couple final README tweaks before template goes public
  • Loading branch information
alessfg committed Feb 2, 2024
1 parent d9f408e commit 28e4865
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/rename_project.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/usr/bin/env bash
while getopts a:n:u:d: flag
# vim:sw=2:ts=2:sts=2:et
while getopts a:n:u: flag
do
case "${flag}" in
a) owner=${OPTARG};;
n) name=${OPTARG};;
u) url=${OPTARG};;
esac
case "${flag}" in
a) owner=${OPTARG};;
n) name=${OPTARG};;
u) url=${OPTARG};;
*) echo "Invalid flag: ${flag}"; exit 1;;
esac
done

echo "Owner: $owner";
Expand All @@ -19,10 +21,10 @@ original_name="{{REPOSITORY_NAME}}"
original_url="{{REPOSITORY_URL}}"
for filename in $(git ls-files)
do
sed -i "s/$original_owner/$owner/g" $filename
sed -i "s/$original_name/$name/g" $filename
sed -i "s/$original_url/$url/g" $filename
echo "Renamed $filename"
sed -i "s/$original_owner/$owner/g" "$filename"
sed -i "s/$original_name/$name/g" "$filename"
sed -i "s/$original_url/$url/g" "$filename"
echo "Renamed $filename"
done

# This command runs only once on GHA!
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/nginxinc/template-repository/main/CODE_OF_CONDUCT.md)
[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/nginxinc/template-repository/blob/main/SUPPORT.md)

[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/template-repository/badge)](https://securityscorecards.dev/viewer/?uri=github.com/nginxinc/template-repository)
[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/nginxinc/template-repository/blob/main/SUPPORT.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/nginxinc/template-repository/main/CODE_OF_CONDUCT.md)

# NGINX Template Repository

Expand All @@ -21,7 +20,7 @@ This template includes all the scaffolding you need to get started on an OSS rep
- [README](https://github.com/nginxinc/template-repository/blob/main/README.md) placeholder. How you structure the README is up to you (although the template provides placeholder sections), but you will need to include:
- A [repostatus](https://www.repostatus.org/) badge
- A contributor covenant/code of conduct badge. (Optional -- If you already have multiple badges and want to reduce clutter, simply including the actual code of conduct is enough.)
- A community and/or commercial support badge. Include the latter -- and replace the URL placeholder with the relevant support URL -- if this repository contains a commercially supported project. You can find a commented out example below the community badge in this README.
- A community and/or commercial support badge. Include the latter -- and replace the commented out badge/URL placeholder with the relevant support URL -- if this repository contains a commercially supported project. You can find a commented out example below the community badge in this README.
- An OSSF Scorecard badge (Optional -- Some projects will by their own nature have low scores. In such a case you might want to remove this badge!)
- An explicit link back to the [Apache License 2.0](https://github.com/nginxinc/template-repository/blob/main/LICENSE)
- An up to date copyright notice
Expand All @@ -47,10 +46,9 @@ This template includes all the scaffolding you need to get started on an OSS rep
<!-- DELETE THE LINES ABOVE THIS AND WRITE YOUR PROJECT README BELOW -- PLACEHOLDER SECTIONS HAVE BEEN INCLUDED FOR YOUR CONVENIENCE -->

[![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/main/CODE_OF_CONDUCT.md)
[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/SUPPORT.md)
<!-- [![Commercial Support](https://badgen.net/badge/support/commercial/cyan?icon=awesome)](<Insert URL>) -->
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}})
[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/SUPPORT.md) <!-- [![Commercial Support](https://badgen.net/badge/support/commercial/cyan?icon=awesome)](<Insert URL>) -->
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/main/CODE_OF_CONDUCT.md)

# {{REPOSITORY_NAME}}

Expand Down

0 comments on commit 28e4865

Please sign in to comment.