- init.sh now parse project.gitref - generate project.gitref that contains git dependencies ./printclonesdep.sh >project.gitref - update fetch_dependencies
47 lines
904 B
Bash
Executable File
47 lines
904 B
Bash
Executable File
#!/bin/bash
|
|
|
|
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
|