Files
artloglaby/fetch_dependencies.sh
philippe lhardy f76f9e17fb 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
2023-07-28 12:04:15 +02:00

63 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
log_any()
{
echo "$@" >&2
}
log_error()
{
log_any "[ERROR] $@"
}
log_info()
{
log_any "[INFO] $@"
}
fetch_jackson_databind()
{
lib_jackson_databind=jackson-databind-${libversion_jackson_databind}.jar
if [[ ! -e libs/$lib_jackson_databind ]]
then
jacksonmaven=https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/${libversion_jackson_databind}/$lib_jackson_databind
pushd libs
wget $jacksonmaven
popd
fi
}
libversion_jackson_databind=2.12.0
sharedrawweb_git_url="ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/sharedrawweb"
libversion_artgaphic=0.2.0
lib_artgaphic=artgaphics-${libversion_artgaphic}.jar
if [[ ! -d ../sharedrawweb ]]
then
log_error "expected a sharedrawweb project parent ( for exports ). Please clone related project."
log_info "cd ..; git clone $sharedrawweb_git_url"
fi
if [[ ! -d libs ]]
then
mkdir libs
fi
if [[ ! -e libs/$lib_artgaphic ]]
then
lib_artgaphic_source_file=../../sharedrawweb/dist/lib/$lib_artgaphic
if [[ -f $lib_artgaphic_source_file ]]
then
ln -s $lib_artgaphic_source_file libs/
else
log_error "Missing $lib_artgaphic_source_file. It is require to build it sharedrawweb project first"
fi
fi
if [[ -n $use_jackson ]]
then
fetch_jackson_databind
fi