<commit_before>#!/bin/bash

# 20111102 mfaure

# For Getopts: very first ":" for error managing, then a ":" after each option requiring an argument
DbUser=
DbUserPasswd=
DbName=

while getopts ":e:" opt; do
  case $opt in
    e) Email="$OPTARG" ;;
    ?) echo "Unkown option $OPTARG" ;;
  esac
done

if [ -z "$Email" ] ; then
	echo "Usage $0 -e <Email> "
        echo "Set given user administrator privileges"
	exit 0
fi

mysql -u $DbUser -p$DbUserPasswd $DbName -e "
UPDATE TGSI_USER SET ROLE_Id_Role=3 WHERE Email1 like \"$Email\";
"<commit_msg>tgol-resources : add set-user-admin script<commit_after>#!/bin/bash

# 20111102 mfaure

# For Getopts: very first ":" for error managing, then a ":" after each option requiring an argument
DbUser=
DbUserPasswd=
DbName=

while getopts ":u:" opt; do
  case $opt in
    u) Email="$OPTARG" ;;
    ?) echo "Unkown option $OPTARG" ;;
  esac
done

if [ -z "$Email" ] ; then
	echo "Usage $0 -u <Email> "
        echo "Set given user administrator privileges"
	exit 0
fi

mysql -u $DbUser -p$DbUserPasswd $DbName -e "
UPDATE TGSI_USER SET ROLE_Id_Role=3 WHERE Email1 like \"$Email\";
"
{'fraction_non_alphanumeric': 0.12822796081923418, 'fraction_numerical': 0.0213713268032057, 'mean_word_length': 3.644628099173554, 'pattern_counts': {'":': 6, '<': 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': '6723269', 'n_tokens_mistral': 434, 'n_tokens_neox': 403, 'n_words': 141}