<commit_before>#!/bin/sh

print_and_execute() {
  if [ "x${INSTAGIT_AM_ROOT}" = "xyes" ]; then
    echo $@ | sed -e 's/^/>>> /g';
    exec $@ | sed -e 's/^/<<< /g';
  else
    echo $@;
  fi;
}

warn() {
  echo $@ >&2;
}

INSTAGIT_COMMAND_PREFIX="";
if [ $(whoami) = "root" ]; then
  INSTAGIT_AM_ROOT="yes";
fi;

MY_ROOT=$(pwd);

if [ $# -lt 2 ]; then
  echo "Usage: $0 user home";
  exit 1;
fi;

if [ ! "x${INSTAGIT_AM_ROOT}" = "xyes" ]; then
  warn "";
  warn "You're running me in non-root mode. That's fine, but it means I'll just output all the commands I'd usually run and you can run them on your own.";
  warn "";
  warn "Just copy and paste everything between the two ===== lines.";
  warn "";
  warn "================";
  warn "";
fi;

MY_LOCATION=$(dirname ${0});
INSTAGIT_INSTALL_USER=${1};
INSTAGIT_INSTALL_HOME=${2};

print_and_execute adduser --system --home ${INSTAGIT_INSTALL_HOME} --disabled-login --disabled-password ${INSTAGIT_INSTALL_USER}
print_and_execute cp -v -a ${MY_ROOT}/bin/instagit.sh ${INSTAGIT_INSTALL_HOME}/instagit.sh;
print_and_execute chmod -v 755 ${INSTAGIT_INSTALL_HOME}/instagit.sh;
print_and_execute cp -v -a ${MY_ROOT}/config/instagit.rc.example ${INSTAGIT_INSTALL_HOME}/.instagit.rc;
print_and_execute chmod -v 644 ${INSTAGIT_INSTALL_HOME}/.instagit.rc;<commit_msg>added shell argument, removed --disabled-login<commit_after>#!/bin/sh

print_and_execute() {
  if [ "x${INSTAGIT_AM_ROOT}" = "xyes" ]; then
    echo $@ | sed -e 's/^/>>> /g';
    exec $@ | sed -e 's/^/<<< /g';
  else
    echo $@;
  fi;
}

warn() {
  echo $@ >&2;
}

INSTAGIT_COMMAND_PREFIX="";
if [ $(whoami) = "root" ]; then
  INSTAGIT_AM_ROOT="yes";
fi;

MY_ROOT=$(pwd);

if [ $# -lt 2 ]; then
  echo "Usage: $0 user home";
  exit 1;
fi;

if [ ! "x${INSTAGIT_AM_ROOT}" = "xyes" ]; then
  warn "";
  warn "You're running me in non-root mode. That's fine, but it means I'll just output all the commands I'd usually run and you can run them on your own.";
  warn "";
  warn "Just copy and paste everything between the two ===== lines.";
  warn "";
  warn "================";
  warn "";
fi;

MY_LOCATION=$(dirname ${0});
INSTAGIT_INSTALL_USER=${1};
INSTAGIT_INSTALL_HOME=${2};

print_and_execute adduser --system --shell /bin/sh --home ${INSTAGIT_INSTALL_HOME} --disabled-password ${INSTAGIT_INSTALL_USER};
print_and_execute cp -v -a ${MY_ROOT}/bin/instagit.sh ${INSTAGIT_INSTALL_HOME}/instagit.sh;
print_and_execute chmod -v 755 ${INSTAGIT_INSTALL_HOME}/instagit.sh;
print_and_execute cp -v -a ${MY_ROOT}/config/instagit.rc.example ${INSTAGIT_INSTALL_HOME}/.instagit.rc;
print_and_execute chmod -v 644 ${INSTAGIT_INSTALL_HOME}/.instagit.rc;
{'fraction_non_alphanumeric': 0.18525519848771266, 'fraction_numerical': 0.009829867674858222, 'mean_word_length': 4.208661417322834, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '2179396', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1003, 'n_words': 254}