<commit_before>#!/bin/bash
if [ ! -z $1 ]
then
  user=$1
  if [ ! -z $2 ]
  then
    password=$2
  else
    echo "No password specified."
    exit
  fi
else
  echo "No username or password specified."
  exit
fi
if [ ! -d /mnt/ceph/fs/containers/sftp/config ]
then
  sudo mkdir -p /mnt/ceph/fs/containers/sftp/config
fi
if [ ! -f /mnt/ceph/fs/containers/sftp/config/users.conf ]
then
  echo "$user:$password:<PASSWORD>" | sudo tee /mnt/ceph/fs/containers/sftp/config/users.conf
  if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
  then
    sudo mkdir -p /mnt/ceph/fs/containers/sftp/data/$user
  fi
else
  if [ -z "$(cat /mnt/ceph/fs/containers/sftp/config/users.conf | grep $user)" ]
  then
    uids=($(cat /mnt/ceph/fs/containers/sftp/config/users.conf | awk '{split($0,a,":"); print a[3]}'))
    if [ -z $uids ]
    then
      uids=1000
    fi
    IFS=$'\n'
    hi=$(echo "${uids[*]}" | sort -nr | head -n1)
    uid=$[$hi+1]
    echo "$user:$password:$uid" | sudo tee --append /mnt/ceph/fs/containers/sftp/config/users.conf
    if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
    then
      sudo mkdir -p /mnt/ceph/fs/containers/sftp/data/$user
    fi
  else
    uid=$(cat /mnt/ceph/fs/containers/sftp/config/users.conf | grep $user | awk '{split($0,a,":"); print a[3]}')
    sudo sed -i '/^$user/d' /mnt/ceph/fs/containers/sftp/config/users.conf
    echo "$user:$password:$uid" | sudo tee --append /mnt/ceph/fs/containers/sftp/config/users.conf
    if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
    then<commit_msg>Update start.sh<commit_after>#!/bin/bash
if [ ! -z $1 ]
then
  user=$1
  if [ ! -z $2 ]
  then
    password=$2
  else
    echo "No password specified."
    exit
  fi
else
  echo "No username or password specified."
  exit
fi
if [ ! -d /mnt/ceph/fs/containers/sftp/config ]
then
  sudo mkdir -p /mnt/ceph/fs/containers/sftp/config
fi
if [ ! -f /mnt/ceph/fs/containers/sftp/config/users.conf ]
then
  echo "$user:$password:<PASSWORD>" | sudo tee /mnt/ceph/fs/containers/sftp/config/users.conf
  if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
  then
    sudo mkdir -p /mnt/ceph/fs/containers/sftp/data/$user
  fi
else
  if [ -z "$(cat /mnt/ceph/fs/containers/sftp/config/users.conf | grep $user)" ]
  then
    uids=($(cat /mnt/ceph/fs/containers/sftp/config/users.conf | awk '{split($0,a,":"); print a[3]}'))
    if [ -z $uids ]
    then
      uids=1000
    fi
    IFS=$'\n'
    hi=$(echo "${uids[*]}" | sort -nr | head -n1)
    uid=$[$hi+1]
    echo "$user:$password:$uid" | sudo tee --append /mnt/ceph/fs/containers/sftp/config/users.conf
    if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
    then
      sudo mkdir -p /mnt/ceph/fs/containers/sftp/data/$user
    fi
  else
    uid=$(cat /mnt/ceph/fs/containers/sftp/config/users.conf | grep $user | awk '{split($0,a,":"); print a[3]}')
    sudo sed -i "/^$user/d" /mnt/ceph/fs/containers/sftp/config/users.conf
    echo "$user:$password:$uid" | sudo tee --append /mnt/ceph/fs/containers/sftp/config/users.conf
    if [ ! -d /mnt/ceph/fs/containers/sftp/data/$user ]
    then
{'fraction_non_alphanumeric': 0.1883159268929504, 'fraction_numerical': 0.009138381201044387, 'mean_word_length': 2.697225572979493, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, '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': '2327612', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1273, 'n_words': 242}