move git url in project.gitref change init.sh

- init.sh now parse project.gitref
- generate project.gitref that contains git dependencies
./printclonesdep.sh >project.gitref
- update fetch_dependencies
This commit is contained in:
philippe lhardy
2023-07-28 12:04:15 +02:00
parent a22a2fd1b6
commit f76f9e17fb
3 changed files with 73 additions and 15 deletions

53
init.sh
View File

@@ -1,11 +1,46 @@
#!/bin/bash
if [[ ! -d artlog_toolbox ]]
then
git clone https://github.com/artlog/artlog_toolbox.git artlog_toolbox
fi
pushd artlog_toolbox
git checkout master
popd
artlog_toolbox/deploy.sh
./doit.sh
setup()
{
artlog_toolbox_path=../artlog_toolbox
if [[ ! -d $artlog_toolbox_path ]]
then
git clone $artlog_toolbox_remote_origin_url $artlog_toolbox_path
pushd $artlog_toolbox_path
git checkout
popd
fi
$artlog_toolbox_path/deploy.sh
}
# parses project.gitref
project=
gitref=project.gitref
while read line
do
if [[ $line =~ \[([_a-z]*)\] ]]
then
project=${BASH_REMATCH[1]}
elif [[ $line =~ remote.origin.url=(.*) ]]
then
remote_origin_url=${BASH_REMATCH[1]}
echo "$project $remote_origin_url"
case $project in
sharedrawweb)
sharedrawweb_remote_origin_url=$remote_origin_url
;;
artloglaby)
artloglaby_remote_origin_url=$remote_origin_url
;;
artlog_toolbox)
artlog_toolbox_remote_origin_url=$remote_origin_url
;;
*)
echo "ERROR unrecognized project='$project' line='$line'"
;;
esac
fi
done <$gitref
setup