39 lines
1.8 KiB
Bash
Executable File
39 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo -n 'Country: '; read Country
|
|
echo -n 'Countries: '; read Countries
|
|
|
|
country=$(echo ${Country} | sed 's/[A-Z]/\L&/g')
|
|
countries=$(echo ${Countries} | sed 's/[A-Z]/\L&/g')
|
|
|
|
rm -Rf ./AutobusApi.Application/${Countries}/*
|
|
|
|
cp -r ./AutobusApi.Application/Countries/* ./AutobusApi.Application/${Countries}/
|
|
|
|
find ./AutobusApi.Application/${Countries} -type f | xargs -I {} perl -0777 -i -pe "s/Countries/${Countries}/g" {}
|
|
find ./AutobusApi.Application/${Countries} -type f | xargs -I {} perl -0777 -i -pe "s/Country/${Country}/g" {}
|
|
find ./AutobusApi.Application/${Countries} -type f | xargs -I {} perl -0777 -i -pe "s/countries/${countries}/g" {}
|
|
find ./AutobusApi.Application/${Countries} -type f | xargs -I {} perl -0777 -i -pe "s/country/${country}/g" {}
|
|
|
|
for dir in $(find ./AutobusApi.Application/${Countries} -type d | grep Country); do
|
|
mv ${dir} $(echo ${dir} | sed -e "s/Country/${Country}/g")
|
|
done
|
|
|
|
for dir in $(find ./AutobusApi.Application/${Countries} -type d | grep Countries); do
|
|
mv ${dir} $(echo ${dir} | sed -e "s/Countries/${Countries}/g")
|
|
done
|
|
|
|
for file in $(find ./AutobusApi.Application/${Countries} -type f | grep Country); do
|
|
mv ${file} $(echo ${file} | sed -e "s/Country/${Country}/g")
|
|
done
|
|
|
|
for file in $(find ./AutobusApi.Application/${Countries} -type f | grep Countries); do
|
|
mv ${file} $(echo ${file} | sed -e "s/Countries/${Countries}/g")
|
|
done
|
|
|
|
cp ./AutobusApi.Api/Controllers/CountryController.cs ./AutobusApi.Api/Controllers/${Country}Controller.cs
|
|
sed -i -e "s/Country/${Country}/g" ./AutobusApi.Api/Controllers/${Country}Controller.cs
|
|
sed -i -e "s/Countries/${Countries}/g" ./AutobusApi.Api/Controllers/${Country}Controller.cs
|
|
sed -i -e "s/country/${country}/g" ./AutobusApi.Api/Controllers/${Country}Controller.cs
|
|
sed -i -e "s/countries/${countries}/g" ./AutobusApi.Api/Controllers/${Country}Controller.cs
|