Initial import of db-manager
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
TMP_DIR="$(mktemp -d)"
|
||||
trap 'rm -rf "$TMP_DIR"' EXIT
|
||||
|
||||
DB_MANAGER_INSTALL_LIB_ONLY=1 source "$ROOT_DIR/scripts/install.sh"
|
||||
|
||||
id() {
|
||||
echo 0
|
||||
}
|
||||
|
||||
PLUGIN_DIR="$TMP_DIR/plugin"
|
||||
CPIF="$TMP_DIR/custom_package_items.conf"
|
||||
mkdir -p "$PLUGIN_DIR"
|
||||
|
||||
printf 'Always_enable=1\n' > "$PLUGIN_DIR/plugin-settings.conf"
|
||||
bootstrap_custom_package_item
|
||||
if [ -e "$CPIF" ]; then
|
||||
echo "custom_package_items.conf should not be created when Always_enable=1" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf 'Always_enable=0\n' > "$PLUGIN_DIR/plugin-settings.conf"
|
||||
bootstrap_custom_package_item
|
||||
if ! grep -q '^db_manager=' "$CPIF"; then
|
||||
echo "db_manager checkbox should be installed when Always_enable=0" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK"
|
||||
Reference in New Issue
Block a user