From: fennecdjay Date: Wed, 9 Oct 2019 22:15:37 +0000 (+0200) Subject: :white_check_mark: Test unused tuple X-Git-Tag: nightly~2198^2~46 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=88d56060e8513fbff071142940c813464e1dc033;p=gwion.git :white_check_mark: Test unused tuple --- diff --git a/scripts/gwion-config b/scripts/gwion-config old mode 100755 new mode 100644 diff --git a/scripts/gwion-pkg b/scripts/gwion-pkg index 3670c374..0840521e 100644 --- a/scripts/gwion-pkg +++ b/scripts/gwion-pkg @@ -1,4 +1,20 @@ +#!/bin/bash + : "${GWION_PLUG_PATH:=$PWD}" + +help() { +prg=$(basename $0) +echo "Usage: + + $prg install - install dependancies + $prg clear - clear dependancies + $prg run - run package + $prg help - this help + +--- +requires GWION_PLUG_PATH environment variable" +} + declare -A magic_variable=() read_manifest() { @@ -57,20 +73,36 @@ install_all_manifests() { for i in "${!magic_variable[@]}" do install_manifest "$i" $(( MAX - ${magic_variable[$i]})) done - fi } -if [ "$1" = "list" ] -then +list_package() { [ -d .gwion-pkg ] && ls .gwion-pkg | sort -u | cut -d_ -f 2 -elif [ "$1" = "run" ] -then # run +} + + +run_package() { shift gwion -c .gwion-pkg/gwion.cfg -p .gwion-pkg $@ +} + +clear_package() { + rm -rf .gwion-pkg +} + +install_package() { + read_all_manifests + get_max + install_all_manifests +} + +if [ "$1" = "list" ] +then list_package +elif [ "$1" = "run" ] +then run_package $@ elif [ "$1" = "clear" ] -then rm -rf .gwion-pkg +then clear_package +elif [ "$1" = "install" ] +then install_package +else help fi -read_all_manifests -get_max -install_all_manifests