From 680a250119f4c7ac3d36460ad3a896b4bf13c655 Mon Sep 17 00:00:00 2001 From: Nikita Kodenko Date: Wed, 2 Oct 2019 22:13:00 +0700 Subject: [PATCH] scripts: bash completion included in deb/rpm packages Fixes #2181 --- scripts/build_posix.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/build_posix.sh b/scripts/build_posix.sh index b61a408f8..1e50b114f 100755 --- a/scripts/build_posix.sh +++ b/scripts/build_posix.sh @@ -17,6 +17,7 @@ BUILD_DIR=build BIN_DIR=$BUILD_DIR/$INSTALL_DIR/bin DESC='Data Version Control - datasets, models, and experiments versioning for ML or data science projects' LIB_DIR=$BUILD_DIR/$INSTALL_DIR/lib +CMPLT_DIR=etc/bash_completion.d print_error() { @@ -51,6 +52,7 @@ fpm_build() $FPM_FLAGS \ -n dvc \ -v $VERSION \ + --config-files $CMPLT_DIR/dvc \ -C $BUILD_DIR usr } @@ -58,6 +60,7 @@ cleanup() { print_info "Cleaning up..." rm -rf build + rm -rf $CMPLT_DIR } install_dependencies() @@ -106,6 +109,11 @@ build_dvc() popd $BIN_DIR/dvc --help fi + + if [[ "$(uname)" == 'Linux' ]]; then + mkdir -p $CMPLT_DIR + cp scripts/completion/dvc.bash $CMPLT_DIR/dvc + fi } cleanup