forked from freifunk-franken/firmware
Robert Langhammer
b98ba27690
The dynamic completion of the variants is broken since 1946aaca87
("fff: create proper package variants instead of copying file").
This hardcodes the available variants. They won't change often.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
[add more verbose commit reference]
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
41 lines
964 B
Plaintext
41 lines
964 B
Plaintext
# completion for buildscript
|
|
# just source this script
|
|
# or put it in your /etc/bash_completion.d/ (you should rename it)
|
|
|
|
_buildscript() {
|
|
case "${COMP_WORDS[1]}" in
|
|
config)
|
|
COMPREPLY=($(compgen -W "openwrt" "${COMP_WORDS[2]}"))
|
|
;;
|
|
selectbsp)
|
|
COMPREPLY=($(compgen -W "$(find bsp -name '*.bsp')" "${COMP_WORDS[2]}"))
|
|
;;
|
|
selectvariant)
|
|
COMPREPLY=($(compgen -W "node layer3" "${COMP_WORDS[2]}"))
|
|
;;
|
|
build)
|
|
COMPREPLY=($(compgen -W "fast debug" "${COMP_WORDS[2]}"))
|
|
;;
|
|
buildall)
|
|
COMPREPLY=($(compgen -W "fast" "${COMP_WORDS[2]}"))
|
|
;;
|
|
release)
|
|
case "${COMP_WORDS[2]}" in
|
|
all)
|
|
COMPREPLY=($(compgen -W "fast" "${COMP_WORDS[3]}"))
|
|
;;
|
|
fast)
|
|
COMPREPLY=($(compgen -W "all" "${COMP_WORDS[3]}"))
|
|
;;
|
|
*)
|
|
COMPREPLY=($(compgen -W "fast all" "${COMP_WORDS[2]}"))
|
|
;;
|
|
esac;;
|
|
*)
|
|
COMPREPLY=($(compgen -W "selectbsp selectvariant updatefeeds prepare config build buildall release clean" "${COMP_WORDS[1]}"))
|
|
;;
|
|
esac
|
|
}
|
|
|
|
complete -F _buildscript ./buildscript
|