aboutsummaryrefslogtreecommitdiffstats
path: root/check_for_translation_work.sh
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2013-11-02 15:30:11 +0100
committerfilip <filip.komar@gmail.com>2013-11-02 15:30:11 +0100
commit0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6 (patch)
treee029bb6a78009cd42223cbe967f662335fddfc09 /check_for_translation_work.sh
parentaef4f1760ad0539a851838ff81ebac381f32c596 (diff)
downloadtools-0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6.tar
tools-0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6.tar.gz
tools-0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6.tar.bz2
tools-0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6.tar.xz
tools-0d1c6a78982bc78fb0dc6c3d3b58a708152b9ce6.zip
added check and addition of git configuration thanks to Алексей Логинов
Diffstat (limited to 'check_for_translation_work.sh')
-rwxr-xr-xcheck_for_translation_work.sh30
1 files changed, 29 insertions, 1 deletions
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)