From de8cb6c64e9d2ae451a969ed6cd2af79a30fbc2d Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 23 Oct 2014 15:03:41 +0200 Subject: [Completion] discards compaudit error messages - give fpath folders to root:root, with go-w - do the same for the parent folder of each.... --- net:foret/Completion.zsh | 2 +- net:foret/completion/_endurance | 29 -------------- net:foret/completion/_sdk-targets | 77 -------------------------------------- net:foret/compsys/sdk/_endurance | 29 ++++++++++++++ net:foret/compsys/sdk/_sdk-targets | 77 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 107 deletions(-) delete mode 100644 net:foret/completion/_endurance delete mode 100644 net:foret/completion/_sdk-targets create mode 100644 net:foret/compsys/sdk/_endurance create mode 100644 net:foret/compsys/sdk/_sdk-targets diff --git a/net:foret/Completion.zsh b/net:foret/Completion.zsh index 0243102..50e1708 100644 --- a/net:foret/Completion.zsh +++ b/net:foret/Completion.zsh @@ -8,6 +8,6 @@ ## NO WARRANTY PROVIDED, USE AT YOUR OWN RISKS ## -fpath=($specific_script:h/completion $fpath) +fpath=($subscript:h/compsys/sdk $fpath) compinit diff --git a/net:foret/completion/_endurance b/net:foret/completion/_endurance deleted file mode 100644 index 1af5d51..0000000 --- a/net:foret/completion/_endurance +++ /dev/null @@ -1,29 +0,0 @@ -#compdef do.sh - -_endurance() { - - list-commands () { - grep '^[[:blank:]]*".*"[[:blank:]]*)' do.sh | tr '")\t|\n' ' ' | tr -s ' ' - } - - list-tests () { - echo all - find /mnt/endurancetesting/ -mindepth 1 -maxdepth 1 -type d ! -name '.*' | cut -d'/' -f4 - } - - list-nodes () { - < /mnt/endurancetesting/planning awk '!/^#|^$/ { if ( ! seen[$1] ) { seen[$1]=1 ; print $1 } }' - } - - case "$service" in - do.sh) - _arguments \ - ':actions:(( $(list-commands) ))' \ - ':tests:(( $(list-tests) ))' \ - ':nodes:(( $(list-nodes) ))' - _alternative \ - '*:files: _files' - ;; - esac - -} diff --git a/net:foret/completion/_sdk-targets b/net:foret/completion/_sdk-targets deleted file mode 100644 index 3428566..0000000 --- a/net:foret/completion/_sdk-targets +++ /dev/null @@ -1,77 +0,0 @@ -#compdef sdk-factory.sh sdk-patch.sh sdk-test.sh sdk-qa.sh set-target-build-env.sh sdk-check.sh - -_sdk-targets() { - - _platforms () { - local _targets_file - - # New-style - _targets_file=tools/builder/target.sh - if [ -e $_targets_file ] - then - source $_targets_file - echo ${=AVAILABLE_TARGETS} - fi - - # Old-style - _targets_file=tools/sdk-targets.txt - if [ -f $_targets_file ] - then - awk '/^ [-_a-zA-Z0-9]+$/ { print $1 }' $_targets_file - return - fi - } - - _current_target () { - local _targets_file=tools/builder/target.sh - [ ! -z "$TARGET" ] || return - - echo $TARGET":Standard SDK" - - if [ -e $_targets_file ] - then - source $_targets_file - for i in ${=AVAILABLE_FLAVOUR} - echo ${TARGET}-$i:$i - for i in ${=AVAILABLE_OPTIONS} - echo ${TARGET}-$i:$i - fi - } - - _other_targets () { - for target in $( _platforms ) ; - do - [ "$target" = "$TARGET" ] && continue; - echo $target - done - } - - case "$service" in - sdk-factory.sh) - _arguments \ - {-a,--enable-all-protocols}'[Enable all protocols]'\ - {-c+,--config=}'[Selects config FILE to use]:file:_files'\ - {-d,--debug-make}'[Add debugging verbosity to make]'\ - {-g,--enable-debug-info}'[Enable debug info in binaries]'\ - {-h,--enable-host}'[Enable host binaries building]'\ - {-i,--disable-security}'[Disable licence checking]'\ - {-n,--nomake}'[No make done]'\ - {-s,--enable-specific-protocols}'[Enable specific protocols]'\ - {-v,--verbose}'[Enable verbose compilation]'\ - ':current target:(( $(_current_target) ))' \ - - framework \ - {-f,--framework-only}'[Generates only the framework libraries]'\ - - protobundle \ - {-p,--protocols-only}'[Generates only the protocols bundle libraries]' - _alternative ':other targets:(( $( _other_targets ) ))' - ;; - set-target-build-env.sh) - _arguments ':platforms:(( $(_platforms) ))' - ;; - sdk-*) - _arguments ':current target:(( $( _current_target) ))' - _alternative ':other targets:(( $( _other_targets ) ))' - ;; - esac - -} diff --git a/net:foret/compsys/sdk/_endurance b/net:foret/compsys/sdk/_endurance new file mode 100644 index 0000000..1af5d51 --- /dev/null +++ b/net:foret/compsys/sdk/_endurance @@ -0,0 +1,29 @@ +#compdef do.sh + +_endurance() { + + list-commands () { + grep '^[[:blank:]]*".*"[[:blank:]]*)' do.sh | tr '")\t|\n' ' ' | tr -s ' ' + } + + list-tests () { + echo all + find /mnt/endurancetesting/ -mindepth 1 -maxdepth 1 -type d ! -name '.*' | cut -d'/' -f4 + } + + list-nodes () { + < /mnt/endurancetesting/planning awk '!/^#|^$/ { if ( ! seen[$1] ) { seen[$1]=1 ; print $1 } }' + } + + case "$service" in + do.sh) + _arguments \ + ':actions:(( $(list-commands) ))' \ + ':tests:(( $(list-tests) ))' \ + ':nodes:(( $(list-nodes) ))' + _alternative \ + '*:files: _files' + ;; + esac + +} diff --git a/net:foret/compsys/sdk/_sdk-targets b/net:foret/compsys/sdk/_sdk-targets new file mode 100644 index 0000000..3428566 --- /dev/null +++ b/net:foret/compsys/sdk/_sdk-targets @@ -0,0 +1,77 @@ +#compdef sdk-factory.sh sdk-patch.sh sdk-test.sh sdk-qa.sh set-target-build-env.sh sdk-check.sh + +_sdk-targets() { + + _platforms () { + local _targets_file + + # New-style + _targets_file=tools/builder/target.sh + if [ -e $_targets_file ] + then + source $_targets_file + echo ${=AVAILABLE_TARGETS} + fi + + # Old-style + _targets_file=tools/sdk-targets.txt + if [ -f $_targets_file ] + then + awk '/^ [-_a-zA-Z0-9]+$/ { print $1 }' $_targets_file + return + fi + } + + _current_target () { + local _targets_file=tools/builder/target.sh + [ ! -z "$TARGET" ] || return + + echo $TARGET":Standard SDK" + + if [ -e $_targets_file ] + then + source $_targets_file + for i in ${=AVAILABLE_FLAVOUR} + echo ${TARGET}-$i:$i + for i in ${=AVAILABLE_OPTIONS} + echo ${TARGET}-$i:$i + fi + } + + _other_targets () { + for target in $( _platforms ) ; + do + [ "$target" = "$TARGET" ] && continue; + echo $target + done + } + + case "$service" in + sdk-factory.sh) + _arguments \ + {-a,--enable-all-protocols}'[Enable all protocols]'\ + {-c+,--config=}'[Selects config FILE to use]:file:_files'\ + {-d,--debug-make}'[Add debugging verbosity to make]'\ + {-g,--enable-debug-info}'[Enable debug info in binaries]'\ + {-h,--enable-host}'[Enable host binaries building]'\ + {-i,--disable-security}'[Disable licence checking]'\ + {-n,--nomake}'[No make done]'\ + {-s,--enable-specific-protocols}'[Enable specific protocols]'\ + {-v,--verbose}'[Enable verbose compilation]'\ + ':current target:(( $(_current_target) ))' \ + - framework \ + {-f,--framework-only}'[Generates only the framework libraries]'\ + - protobundle \ + {-p,--protocols-only}'[Generates only the protocols bundle libraries]' + _alternative ':other targets:(( $( _other_targets ) ))' + ;; + set-target-build-env.sh) + _arguments ':platforms:(( $(_platforms) ))' + ;; + sdk-*) + _arguments ':current target:(( $( _current_target) ))' + _alternative ':other targets:(( $( _other_targets ) ))' + ;; + esac + +} -- cgit v1.2.3