scripts: bash completion included in deb/rpm packages

Fixes #2181
This commit is contained in:
Nikita Kodenko
2019-10-02 22:49:50 +07:00
parent 8fb3eaaa08
commit 680a250119
+8
View File
@@ -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