From 0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6 Mon Sep 17 00:00:00 2001 From: filip Date: Sat, 2 Nov 2013 15:30:11 +0100 Subject: =?UTF-8?q?added=20check=20and=20addition=20of=20git=20configurati?= =?UTF-8?q?on=20thanks=20to=20=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= =?UTF-8?q?=20=D0=9B=D0=BE=D0=B3=D0=B8=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README | 3 +++ check_for_translation_work.sh | 30 +++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README b/README index 4a5aaf6e..e6758edf 100644 --- a/README +++ b/README @@ -1,4 +1,6 @@ NEWS +2013/11/02 +added check and addition of git configuration thanks to Алексей Логинов 2013/11/01 added option to exclude all work on web pages translation @@ -27,6 +29,7 @@ FEATURES -testing for differences of *.po file from working copy if required -testing for differences of *.pot file from working copy if required -option to exclude all work on web pages translation +-checking and addition of git configuration -searching for new *.pot files in svn (TODO also search from git) INSTALATION AND CONFIGURATION diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh index 12eb76c6..9e7ca5b2 100755 --- a/check_for_translation_work.sh +++ b/check_for_translation_work.sh @@ -7,7 +7,7 @@ # # Filip Komar, 2012, 2013 # Remco Rijnders, 2012 -# $Id: check_for_translation_work.sh 2013-11-02 13:28:00 UTC filip $ +# $Id: check_for_translation_work.sh 2013-11-02 14:26:00 UTC filip $ # # Please see git for a list of changes to this script. # @@ -120,6 +120,34 @@ if [ -z "$git_directory" ]; then echo -e "\E[m" exit 2 fi +if [ ! -f ~/.gitconfig_ ]; then + cat > ~/.gitconfig_ << "EOF" +[user] + name = Your Name + email = your_email@example.com +[color] + ui = true +[url "git://git.mageia.org/"] + insteadof = mga: +[url "ssh://git@git.mageia.org/"] + pushInsteadof = mga: +[alias] + ci = commit + up = pull --rebase +[push] + default = matching +EOF + echo "It seems that you didn't configured git yet" > "$log_directory"/list_of_resources_for_translation.txt + echo "Please edit ~/.gitconfig See: https://wiki.mageia.org/en/Git_usage_for_l10n_and_doc" > "$log_directory"/list_of_resources_for_translation.txt + echo -e "\E[31m" + echo "It seems that you didn't configured git yet. A template configuration" | tee -a "$logfile"_this_run.log + echo "file named ~/.gitconfig has been made in your home directory." | tee -a "$logfile"_this_run.log + echo "Please edit it according to your needs. There is a guide in our wiki:" | tee -a "$logfile"_this_run.log + echo "https://wiki.mageia.org/en/Git_usage_for_l10n_and_doc" | tee -a "$logfile"_this_run.log + echo "" + read -p "Please read information above and then press any key to continue... " -n1 -s + echo -e "\E[m" +fi # save pwd to saved_dir saved_dir=$(pwd) -- cgit v1.2.1