Files
2024-08-22 15:08:47 +12:00

30 lines
839 B
Bash
Executable File

#!/bin/bash
# Ask the user for their name
echo What is your name? e.g Joe Bloggs
read varname
echo What is your Company/Org name?
read varorg
echo What is this roles name?
read varrolename
echo Please enter a description for this role
read vardesc
echo What is your galaxy namespace? e.g cybercinch
read varnamespace
echo -n "Updating role information..."
sed -i -e "s/%author_name%/${varname}/g" \
-e "s/%role_description%/${vardesc}/g" \
-e "s/%company_name%/${varorg}/g" \
-e "s/%role_name%/${varrolename}/g" \
-e "s/%namespace%/${varnamespace}/g" \
meta/main.yml
sed -i -e "s/%author_name%/${varname}/g" \
-e "s/%role_name%/${varrolename}/g" \
README.md
echo "done"
echo "Now finish any remaining changes in meta/main.yml and README.md"
echo "Once that is completed commit and happy developing!"