<commit_before>#!/usr/bin/env bash

openhab2_setup() {
  introtext_stable="You are about to install or upgrade to the latest stable openHAB release.\\n
Please be aware that downgrading from a newer unstable snapshot build is not officially supported. Please consult with the documentation or community forum and be sure to take a full openHAB configuration backup first!"
  successtext_stable="The stable release of openHAB is now installed on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.
Check the \"openHAB Release Notes\" and the official announcements to learn about additons, fixes and changes."
  introtext_testing="You are about to install or upgrade to the latest milestone (testing) openHAB build. It contains the latest features and is supposed to run stable, but if you experience bugs or incompatibilities, please help enhancing openHAB by posting them on the community forum or by raising a Github issue.\\n
  Please be aware that downgrading from a newer build is not officially supported. Please consult with the documentation or community forum and be sure to take a full openHAB configuration backup first!"
successtext_testing="The testing release of openHAB is now installed on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.
Check the \"openHAB Release Notes\" and the official announcements to learn about additons, fixes and changes."
  introtext_unstable="Proceed with caution!\\nYou are about to switch over to the latest openHAB 2 unstable snapshot build. The daily snapshot builds contain the latest features and improvements but might also suffer from bugs or incompatibilities. Please be sure to take a full openHAB configuration backup first!"
  successtext_unstable="The latest unstable snapshot build of openHAB 2 is now running on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.\\nIf you find any problem or bug, please report it and state the snapshot version you are on. To stay up-to-date with improvements and bug fixes you should upgrade your packages (the openhab2 and openhab2-addons packages) regularly."

  if [ "$1" == "unstable" ]; then
    UNSTABLE=1
  fi

  if [ "$1" == "testing" ]; then
    TESTING=1
  fi

  if [ ! -n "$UNSTABLE" ]; then
    if [ ! -n "$TESTING" ]; then
      echo -n "$(timestamp) [openHABian] Installing or upgrading to latest openHAB release (stable)... "
      introtext=$introtext_stable
      successtext=$successtext_stable
      REPO="deb https://dl.bintray.com/openhab/apt-repo2 stable main"
    else
      echo -n "$(timestamp) [openHABian] Installing or upgrading to latest openHAB milestone release (testing)... "
      introtext=$introtext_testing<commit_msg>Install apt-transport-https prior to adding repos (#505)<commit_after>#!/usr/bin/env bash

openhab2_setup() {
  introtext_stable="You are about to install or upgrade to the latest stable openHAB release.\\n
Please be aware that downgrading from a newer unstable snapshot build is not officially supported. Please consult with the documentation or community forum and be sure to take a full openHAB configuration backup first!"
  successtext_stable="The stable release of openHAB is now installed on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.
Check the \"openHAB Release Notes\" and the official announcements to learn about additons, fixes and changes."
  introtext_testing="You are about to install or upgrade to the latest milestone (testing) openHAB build. It contains the latest features and is supposed to run stable, but if you experience bugs or incompatibilities, please help enhancing openHAB by posting them on the community forum or by raising a Github issue.\\n
  Please be aware that downgrading from a newer build is not officially supported. Please consult with the documentation or community forum and be sure to take a full openHAB configuration backup first!"
successtext_testing="The testing release of openHAB is now installed on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.
Check the \"openHAB Release Notes\" and the official announcements to learn about additons, fixes and changes."
  introtext_unstable="Proceed with caution!\\nYou are about to switch over to the latest openHAB 2 unstable snapshot build. The daily snapshot builds contain the latest features and improvements but might also suffer from bugs or incompatibilities. Please be sure to take a full openHAB configuration backup first!"
  successtext_unstable="The latest unstable snapshot build of openHAB 2 is now running on your system. Please test the correct behavior of your setup. You might need to adapt your configuration, if available. If you did changes to files below '/var/lib/openhab2' before, they were replaced but you can restore them from backup files next to the originals.\\nIf you find any problem or bug, please report it and state the snapshot version you are on. To stay up-to-date with improvements and bug fixes you should upgrade your packages (the openhab2 and openhab2-addons packages) regularly."

  if [ "$1" == "unstable" ]; then
    UNSTABLE=1
  fi

  if [ "$1" == "testing" ]; then
    TESTING=1
  fi

  cond_redirect apt -y install apt-transport-https

  if [ ! -n "$UNSTABLE" ]; then
    if [ ! -n "$TESTING" ]; then
      echo -n "$(timestamp) [openHABian] Installing or upgrading to latest openHAB release (stable)... "
      introtext=$introtext_stable
      successtext=$successtext_stable
      REPO="deb https://dl.bintray.com/openhab/apt-repo2 stable main"
    else
      echo -n "$(timestamp) [openHABian] Installing or upgrading to latest openHAB milestone release (testing)... "
      introtext=$introtext_testing
{'fraction_non_alphanumeric': 0.05686069130629957, 'fraction_numerical': 0.004339368547059704, 'mean_word_length': 4.3472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5405516', 'n_tokens_mistral': 1696, 'n_tokens_neox': 1617, 'n_words': 922}