display config before executing template
This commit is contained in:
parent
46af218046
commit
f93dcb23a4
1 changed files with 6 additions and 2 deletions
6
init.sh
6
init.sh
|
@ -19,15 +19,19 @@ echo "ALL PRIOR DATA, INCLUDING BUT NOT LIMITED TO THE GIT "
|
||||||
echo "HISTORY IN THIS DIRECTORY AND ALL ITS SUBDIRECTORIES "
|
echo "HISTORY IN THIS DIRECTORY AND ALL ITS SUBDIRECTORIES "
|
||||||
echo "WILL BE LOST. "
|
echo "WILL BE LOST. "
|
||||||
echo " "
|
echo " "
|
||||||
|
echo "YOUR GIVEN CONFIGURATION IS AS FOLLOWS: "
|
||||||
|
echo ""
|
||||||
|
cat config | tail -n 5
|
||||||
|
echo ""
|
||||||
|
|
||||||
read -p "ARE YOU SURE YOU WANT TO CONTINUE? (y/n) " -n 1 -r
|
read -p "ARE YOU SURE YOU WANT TO CONTINUE? (y/n) " -n 1 -r
|
||||||
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
if [[ ! $REPLY =~ ^[Yy]$ ]]
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "" # Move to new line
|
||||||
|
|
||||||
{ ## DO NOT REMOVE THIS OR EVERYTHING BLOWS UP
|
{ ## DO NOT REMOVE THIS OR EVERYTHING BLOWS UP
|
||||||
cat config
|
|
||||||
cd template
|
cd template
|
||||||
find -type f | xargs sed -i "s/\$mainfile/$(printf '%s\n' "$mainfile" | sed -e 's/[\/&]/\\&/g')/g"
|
find -type f | xargs sed -i "s/\$mainfile/$(printf '%s\n' "$mainfile" | sed -e 's/[\/&]/\\&/g')/g"
|
||||||
find -type f | xargs sed -i "s/\$course/$(printf '%s\n' "$course" | sed -e 's/[\/&]/\\&/g')/g"
|
find -type f | xargs sed -i "s/\$course/$(printf '%s\n' "$course" | sed -e 's/[\/&]/\\&/g')/g"
|
||||||
|
|
Loading…
Reference in a new issue