metascript and printclonedep
will move to metascript Signed-off-by: philippe lhardy <philippe.lhardy@astrolabe.coop>
This commit is contained in:
@@ -1,20 +1,14 @@
|
||||
#!/bin/bash
|
||||
# SPDX-FileCopyrightText: 2025 artlog@l0g.eu
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# header generated by lib/metascript.sh header
|
||||
# metascript_version=v1.0.0
|
||||
|
||||
log_any()
|
||||
{
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
log_error()
|
||||
{
|
||||
log_any "[ERROR] $@"
|
||||
}
|
||||
|
||||
log_info()
|
||||
{
|
||||
log_any "[INFO] $@"
|
||||
}
|
||||
|
||||
toolsdir=lib
|
||||
pushd $toolsdir >/dev/null
|
||||
toolsdir=$(pwd)
|
||||
source metascript.sh
|
||||
popd >/dev/null
|
||||
|
||||
fetch_jackson_databind()
|
||||
{
|
||||
@@ -22,39 +16,61 @@ fetch_jackson_databind()
|
||||
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
|
||||
$defer pushd libs
|
||||
$metarun wget $jacksonmaven
|
||||
$defer popd
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_zstd-jni()
|
||||
{
|
||||
|
||||
echo "compiled from https://github.com/luben/zstd-jni commit 54d3d50c16d96bd8a30e2d4c0a9648001a52d6f9"
|
||||
# echo "compiled from https://github.com/luben/zstd-jni commit 54d3d50c16d96bd8a30e2d4c0a9648001a52d6f9"
|
||||
# had to hack through jar generation ...
|
||||
# cp ~/artisanlogiciel/ext_projects/java/zstd-jni/target/zstd-jni-1.5.2-2.jar .
|
||||
pushd libs
|
||||
wget https://repo1.maven.org/maven2/com/github/luben/zstd-jni/${libversion_zstdjni}/zstd-jni-${libversion_zstdjni}.jar
|
||||
popd
|
||||
$defer pushd libs
|
||||
$metarun wget https://repo1.maven.org/maven2/com/github/luben/zstd-jni/${libversion_zstdjni}/zstd-jni-${libversion_zstdjni}.jar
|
||||
$defer popd
|
||||
}
|
||||
|
||||
# HARDCODED START
|
||||
libversion_zstdjni=1.5.2-2
|
||||
libversion_jackson_databind=2.12.0
|
||||
sharedrawweb_git_url="ssh://philippe@www4.artisanlogiciel.net:2023/home/philippe/artisanlogiciel/code/sharedrawweb"
|
||||
sharedrawweb_git_url="ssh://git@www4.artisanlogiciel.net:2023/home/git/artisanlogiciel/code/sharedrawweb"
|
||||
libversion_artgaphic=0.2.0
|
||||
# HARDCODED END
|
||||
lib_artgaphic=artgaphics-${libversion_artgaphic}.jar
|
||||
|
||||
metarun=metarun
|
||||
# change default to sudo if needed
|
||||
# metasudo=sudo
|
||||
|
||||
if [[ ! -d ../sharedrawweb ]]
|
||||
while [[ $# > 0 ]]
|
||||
do
|
||||
case "$1" in
|
||||
use_jackson)
|
||||
use_jackson=$1
|
||||
;;
|
||||
use_zstd)
|
||||
use_zstd=1
|
||||
;;
|
||||
*)
|
||||
parsemetaarg "$1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
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"
|
||||
log_info "git clone $sharedrawweb_git_url sharedrawweb"
|
||||
fi
|
||||
|
||||
if [[ ! -d libs ]]
|
||||
then
|
||||
mkdir libs
|
||||
$metarun mkdir libs
|
||||
fi
|
||||
|
||||
if [[ ! -e libs/$lib_artgaphic ]]
|
||||
@@ -63,14 +79,14 @@ then
|
||||
if [[ -f $lib_artgaphic_source_file ]]
|
||||
then
|
||||
# ../ since libs is one level below current project
|
||||
ln -s ../$lib_artgaphic_source_file libs/
|
||||
$metarun 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
|
||||
then
|
||||
fetch_jackson_databind
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user