<commit_before>#!/bin/bash
#author Haeroe

if [ $1 = --help ]; then
	echo "Example usage: newrepo.sh name reponame directory";
	exit 1;
fi

if [[ $# -lt 2 || $# -gt 3 ]]; then
	echo "Bad arguments. Help: newrepo.sh --help";
	exit 1;
fi

USER="$1"
NAME="$2"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

mkdir -p "$DIR"
pushd "$DIR"

echo "GitHub password for ${USER}:"
read -s PASS

FAIL=curl -u "${USER}:${PASS}" https://api.github.com/user/repos -d "{\"name\":\"${NAME}\"}" | grep -c "\"Bad credentials\""

if [ FAIL -gt 0 ]; then
	exit 1;
fi

git init
git remote add origin <EMAIL>:"${USER}"/"${NAME}".git

touch README
touch LICENSE
touch .gitignore

git add .
git commit -m "Initial commit"
git push origin master

popd<commit_msg>Initial commit<commit_after>#!/bin/bash
#author Haeroe

if [ $1 = --help ]; then
	echo "Example usage: newrepo.sh name reponame directory";
	exit 1;
fi

if [[ $# -lt 2 || $# -gt 3 ]]; then
	echo "Bad arguments. Help: newrepo.sh --help";
	exit 1;
fi

USER="$1"
NAME="$2"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

mkdir -p "$DIR"
pushd "$DIR"

echo "GitHub password for ${USER}:"
read -s PASS

FAIL=(curl -u "${USER}:${PASS}" https://api.github.com/user/repos -d "{\"name\":\"${NAME}\"}" | grep -c "\"Bad credentials\"")

if [ FAIL -gt 0 ]; then
	exit 1;
fi

git init
git remote add origin <EMAIL>:"${USER}"/"${NAME}".git

touch README
touch LICENSE
touch .gitignore

git add .
git commit -m "Initial commit"
git push origin master

popd
{'fraction_non_alphanumeric': 0.2054703135423616, 'fraction_numerical': 0.0133422281521014, 'mean_word_length': 3.6296296296296298, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '1393228', 'n_tokens_mistral': 604, 'n_tokens_neox': 567, 'n_words': 190}