#!/bin/bash

## Copyright (C) 2022 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

set -x
set -e

true "$0: START"

true "$0: INFO: This script is for developers-only."

if [ ! "$1" = "force" ]; then
  true "$0: ERROR: No argument given!" >&2
  exit 1
fi

if ! sudo --non-interactive /usr/bin/test -x /usr/bin/test; then
  set-labwc-keymap de || true
  systemcheck --verbose --leak-tests --gui --cli
  exit 0
fi

dev-root force

sudo set-system-keymap de || true

sudo repository-dist --enable --repository developers

systemcheck --verbose --leak-tests --gui --cli

true "$0: END: OK"
