#!/usr/bin/env bash
#
# This file is generated by l2tdevtools update-dependencies.py any dependency
# related changes should be made in dependencies.ini.

# Exit on error.
set -e

# Dependencies for running dfvfs, alphabetized, one per line.
# This should not include packages only required for testing or development.
PYTHON2_DEPENDENCIES="PyYAML
                      libbde-python
                      libewf-python
                      libfsapfs-python2
                      libfsntfs-python
                      libfvde-python
                      libfwnt-python
                      libqcow-python
                      libsigscan-python
                      libsmdev-python
                      libsmraw-python
                      libvhdi-python
                      libvmdk-python
                      libvshadow-python
                      libvslvm-python
                      python-backports-lzma
                      python-crypto
                      python-dfdatetime
                      python-dtfabric
                      python-pysqlite
                      python-pytsk3";

# Additional dependencies for running tests, alphabetized, one per line.
TEST_DEPENDENCIES="python-mock";

# Additional dependencies for development, alphabetized, one per line.
DEVELOPMENT_DEPENDENCIES="pylint";

# Additional dependencies for debugging, alphabetized, one per line.
DEBUG_DEPENDENCIES="libbde-debuginfo
                    libbde-python-debuginfo
                    libewf-debuginfo
                    libewf-python-debuginfo
                    libfsapfs-debuginfo
                    libfsapfs-python2-debuginfo
                    libfsntfs-debuginfo
                    libfsntfs-python-debuginfo
                    libfvde-debuginfo
                    libfvde-python-debuginfo
                    libfwnt-debuginfo
                    libfwnt-python-debuginfo
                    libqcow-debuginfo
                    libqcow-python-debuginfo
                    libsigscan-debuginfo
                    libsigscan-python-debuginfo
                    libsmdev-debuginfo
                    libsmdev-python-debuginfo
                    libsmraw-debuginfo
                    libsmraw-python-debuginfo
                    libvhdi-debuginfo
                    libvhdi-python-debuginfo
                    libvmdk-debuginfo
                    libvmdk-python-debuginfo
                    libvshadow-debuginfo
                    libvshadow-python-debuginfo
                    libvslvm-debuginfo
                    libvslvm-python-debuginfo";

sudo dnf install dnf-plugins-core
sudo dnf copr -y enable @gift/dev
sudo dnf install -y ${PYTHON2_DEPENDENCIES}

if [[ "$*" =~ "include-debug" ]]; then
    sudo dnf install -y ${DEBUG_DEPENDENCIES}
fi

if [[ "$*" =~ "include-development" ]]; then
    sudo dnf install -y ${DEVELOPMENT_DEPENDENCIES}
fi

if [[ "$*" =~ "include-test" ]]; then
    sudo dnf install -y ${TEST_DEPENDENCIES}
fi

