diff --git a/scripts/milk-all b/scripts/milk-all index bd2daa10..a11b0836 100755 --- a/scripts/milk-all +++ b/scripts/milk-all @@ -1,3 +1,25 @@ #!/usr/bin/env bash -MILKCLI_APPNAME="milk-all" MILKCLI_ADD_LIBS="$MILKCLI_ADD_LIBS;milklinalgebra,milkfft,milkimagebasic,milkimagefilter,milkimageformat,milkimagegen,milkimgreduce,milkinfo,milkkdtree,milklinARfilterPred,milklinoptimtools,milkmoduleexample,milkpsf,milkstatistic,milkZernikePolyn" milk "$@" +MSdescr="milk with all installed modules" + + +modulelist="milklinalgebra,milkfft,milkimagebasic,milkimagefilter,milkimageformat,milkimagegen,milkimgreduce,milkinfo,milkkdtree,milklinARfilterPred,milklinoptimtools,milkmoduleexample,milkpsf,milkstatistic,milkZernikePolyn" + +# Extended description +MSextdescr="Loads modules: +$modulelist +" + +source milk-script-std-config + + + +RequiredCommands=( milk ) +RequiredFiles=() +RequiredDirs=() + +source milk-argparse + + + +MILKCLI_APPNAME="milk-all" MILKCLI_ADD_LIBS="${MILKCLI_ADD_LIBS-};${modulelist}" milk "$@" diff --git a/scripts/milk-commands b/scripts/milk-commands index 236ec1d3..739e0112 100755 --- a/scripts/milk-commands +++ b/scripts/milk-commands @@ -1,11 +1,14 @@ #!/usr/bin/env bash +# This script uses milk-argparse +# See template milk-scriptexample in module milk_module_example for template and instructions + + MSdescr="list milk- scripts" MSextdescr="List milk scripts Scan system for milk- commands - " source milk-script-std-config @@ -34,7 +37,20 @@ NC='\033[0m' # No Color echo "LIST OF MILK COMMANDS :" +excludestring=("milk-argparse" "milk-check" "milk-cr2tofits" "milk-isio-scan" "milk-fpslist-addentry" "milk-logshim" "milk-logshimkill" "milk-logshimoff" "milk-logshimon" "milk-makecsetandrt" "milk-rmshmim" "milk-shm2FITSloop" "milk-shm2FITS" "milk-shmimmon" "milk-shmimpurge") + for cmd in $CMDLIST; do + +EXCLUDE=0 +for exclcmd in ${excludestring[@]}; do + if [ "${exclcmd}" = "${cmd}" ]; then + #pathstring="$(which ${cmd})" + #printf " ${GREEN}%-32s${NC} %s\n" "$cmd" "${pathstring}" + EXCLUDE=1 + fi +done + + if [ "${PRINTPATH}" = "1" ]; then pathstring="$(which ${cmd})" printf " ${GREEN}%-32s${NC} %s\n" "$cmd" "${pathstring}" @@ -42,8 +58,12 @@ for cmd in $CMDLIST; do filename="$(which ${cmd})" datestring="$(date -r $filename '+%Y-%m-%dT%H:%M:%SZ')" CMDLISTOUT+="$(printf "%s %s;" "${datestring}" "$cmd")" - else + else + if [ "${EXCLUDE}" = "0" ]; then helpline=$( $cmd -hs | head -n 1 ) + else + helpline="" + fi printf " ${GREEN}%-32s${NC} %s\n" "$cmd" "$helpline" fi diff --git a/src/COREMOD_memory/scripts/milk-semloopspeed b/src/COREMOD_memory/scripts/milk-semloopspeed index ff771a7f..af76c8a1 100755 --- a/src/COREMOD_memory/scripts/milk-semloopspeed +++ b/src/COREMOD_memory/scripts/milk-semloopspeed @@ -12,7 +12,7 @@ MSdescr="measure semaphore latency" # Extended description -MSdescr="creates 2 streams and 2 processes +MSextdescr="creates 2 streams and 2 processes process AB waits on imA, pokes imB process BA waits on imB, pokes imA " @@ -40,9 +40,8 @@ MSarg+=( "nbloop:int:number of loop interations" ) # parse arguments source milk-argparse -NBLOOP="${inputMSargARRAY[0]}" - +NBLOOP="${inputMSargARRAY[0]}" SEMTRIG="3" diff --git a/src/milk_module_example/scripts/milk-semtestspeed b/src/milk_module_example/scripts/milk-semtestspeed index b35807c6..83adc06f 100755 --- a/src/milk_module_example/scripts/milk-semtestspeed +++ b/src/milk_module_example/scripts/milk-semtestspeed @@ -1,13 +1,39 @@ #!/usr/bin/env bash -# Test semaphore latency -# Sets up two streams, imA and imB +# This script uses milk-argparse +# See template milk-scriptexample in module milk_module_example for template and instructions + +MSdescr="test semaphore latency" + +MSextdescr=" +Sets up two streams, imA and imB +" + +source milk-script-std-config + + +# prerequisites # +RequiredCommands=( milk tmux ) +RequiredFiles=() +RequiredPipes=() +RequiredDirs=() + +# SCRIPT MANDATORY ARGUMENTS +# syntax: "name:type(s)/test(s):description" +# +MSarg+=( "nbloop:integer:number of loop iterations" ) +MSarg+=( "semtrig:integer:semaphore trigger" ) + + +source milk-argparse + +NBLOOP="${inputMSargARRAY[0]}" +SEMTRIG="${inputMSargARRAY[1]}" echo "CTEST_FULL_OUTPUT" -SEMTRIG="$2" -NBLOOP="$1" + milk << EOF mk2Dim "s>imA" 100 100