moved over victorinix from https://github.com/c2vi/victorinix into parts/vic

This commit is contained in:
Sebastian Moser
2026-02-01 13:16:22 +01:00
parent 94d2ad9314
commit fa103b3fa7
23 changed files with 12861 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
#set -e
function vic_run_func() {
$BINARY $@
}
function vic_build_func_internal() {
vic_build_func
exit_code=$?
if [[ "$exit_code" != "0" ]]
then
echo "vic wrapper: BUILD FAILED, not running"
return $exit_code
fi
}
function vic_wrapper_run() {
dev_null=$(command -v vic_main ) && vic_main "$@"
if [ ! -z ${VIC_NO_RUN+x} ]
then
return
fi
if [[ "$1" == "b" ]]
then
vic_build_func_internal && vic_run_func "${@:2}"
# build only
elif [[ "$1" == "bo" ]]
then
vic_build_func_internal
# run only
elif [[ "$1" == "ro" ]]
then
vic_run_func "${@:2}"
# if VIC_WRAPPER_REBUILD is set, then build as well
elif [ ! -z ${VIC_WRAPPER_REBUILD+x} ]
then
vic_build_func_internal && vic_run_func "$@"
# default only run
else
vic_run_func "$@"
fi
}