#!/usr/bin/env bash while getopts a:n:u:d: flag do case "${flag}" in a) author=${OPTARG};; n) name=${OPTARG};; u) urlname=${OPTARG};; d) description=${OPTARG};; esac done echo "Author: $author"; echo "Project Name: $name"; echo "Project URL name: $urlname"; echo "Description: $description"; echo "Renaming project..." original_author="Projects" original_name="DotnetTestExe" original_urlname="DotnetTestExe" original_description="Awesome DotnetTestExe created by Projects" # for filename in $(find . -name "*.*") for filename in $(git ls-files) do sed -i "s/$original_author/$author/g" $filename sed -i "s/$original_name/$name/g" $filename sed -i "s/$original_urlname/$urlname/g" $filename sed -i "s/$original_description/$description/g" $filename echo "Renamed $filename" done mv DotnetTestExe $name mv DotnetTestExe.Tests $name.Tests mv DotnetTestExe.sln $name.sln mv $name/DotnetTestExe.csproj $name/$name.csproj mv $name.Tests/DotnetTestExe.Tests.csproj $name.Tests/$name.Tests.csproj # This command runs only once on GHA! rm -rf .gitea/template.yml