2020-09-04 16:55:35 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "Project name: $1"
|
|
|
|
|
|
|
|
if [ $# -ne 1 ]
|
|
|
|
then
|
|
|
|
echo "You call this script wtth wrong arguments."
|
|
|
|
echo "Example for start script:"
|
|
|
|
echo "./init.sh MyCmakeProject"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
REPLACESTRING="s+RENAME_ME+$1+g"
|
|
|
|
echo $REPLACESTRING
|
|
|
|
|
|
|
|
find . -type f -exec sed -i $REPLACESTRING {} +
|
|
|
|
find . -type f -exec sed -i $REPLACESTRING {} +
|
|
|
|
|
2021-03-19 13:50:06 +03:00
|
|
|
find src -type f -name '*RENAME_ME*' -exec mv {} ${{}/RENAME_ME/$1} \;
|
2020-09-04 16:55:35 +03:00
|
|
|
set -e
|
|
|
|
|
|
|
|
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
|
|
|
|
while read path_key path
|
|
|
|
do
|
|
|
|
url_key=$(echo $path_key | sed 's/\.path/.url/')
|
|
|
|
url=$(git config -f .gitmodules --get "$url_key")
|
|
|
|
git submodule add $url $path
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|