Python/.gitea/rename_project.sh
Simon Diesenreiter 7dcf36df6d
Some checks are pending
CI / tests_mac (macos-latest, 3.9) (push) Blocked by required conditions
CI / tests_win (windows-latest, 3.9) (push) Blocked by required conditions
CI / linter (ubuntu-latest, 3.9) (push) Successful in 15s
Rename the project from template / rename-project (push) Successful in 13s
CI / tests_linux (ubuntu-latest, 3.9) (push) Successful in 14s
some mroe cleanup
2024-11-09 08:22:28 -08:00

37 lines
915 B
Bash
Executable File

#!/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="author_name"
original_name="project_name"
original_urlname="project_urlname"
original_description="project_description"
# 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 project_name $name
# This command runs only once on GHA!
rm -rf .gitea/template.yml