aboutsummaryrefslogtreecommitdiffstats
path: root/check_for_translation_work.sh
diff options
context:
space:
mode:
authorRemco Rijnders <remmy@mageia.org>2012-08-16 06:27:05 +0000
committerRemco Rijnders <remmy@mageia.org>2012-08-16 06:27:05 +0000
commitae4ca2724f9509fdfaae83e2b475a15986daea8d (patch)
tree62baccd41f90617e1c6e57b2f3ce1016fbf4698a /check_for_translation_work.sh
parentdfa1d37956497aab34f87adcdfd58a6d88301179 (diff)
downloadtools-ae4ca2724f9509fdfaae83e2b475a15986daea8d.tar
tools-ae4ca2724f9509fdfaae83e2b475a15986daea8d.tar.gz
tools-ae4ca2724f9509fdfaae83e2b475a15986daea8d.tar.bz2
tools-ae4ca2724f9509fdfaae83e2b475a15986daea8d.tar.xz
tools-ae4ca2724f9509fdfaae83e2b475a15986daea8d.zip
Split off user configuration into a seperate file which is created upon first run.
Diffstat (limited to 'check_for_translation_work.sh')
-rwxr-xr-xcheck_for_translation_work.sh33
1 files changed, 24 insertions, 9 deletions
diff --git a/check_for_translation_work.sh b/check_for_translation_work.sh
index 6e1a5d02..834ff24e 100755
--- a/check_for_translation_work.sh
+++ b/check_for_translation_work.sh
@@ -25,9 +25,6 @@
# -searching for new *.pot files in svn
-
-
-
# TODO:
# implement --password ARG to simplify svn authentication if used
# simplify web copying part
@@ -39,18 +36,27 @@
# testing web pages checkout
# better documentation
#
-# Configuration:
-language_code=sl
-user=filip
-# use existing folders
-svn_folder="/home/filip/Dokumenti/Prevodi programov/Mageia/svn_anonymous"
-working_translations_folder="/home/filip/Dokumenti/Prevodi programov/Mageia"
+if [ -f ~/.mageia-i18n-settings ]; then
+ source ~/.mageia-i18n-settings
+else
+ cat > ~/.mageia-i18n-settings << "EOF"
+# Please change the below values to match your needs:
+language_code=xx
+user=svnusername_if_you_have_one
+
+# Where to put the svn files and your working directory,
+# please make sure those folders exist.
+svn_folder="/home/user/Mageia/i18n/svn_anonymous"
+working_translations_folder="/home/user/Mageia/i18n/translations"
# choose svn method (user or anonymous)
#svn_method="svn+ssh://$user@"
svn_method="svn://"
+# The following lines can be changed if you desire, but this is
+# not needed to properly use this script.
+
# choose quiet mode or normal
#quiet_mode="-q"
quiet_mode=""
@@ -86,6 +92,15 @@ debug=0
# set searching for new *.pot files in svn with 1
searching_for_new_pot_files_in_svn=0
+EOF
+ echo "This script has not been configured yet for your language. A template"
+ echo "configuration file has been made in .mageia-i18n-settings in your"
+ echo "home directory. Please edit this file according to your needs before"
+ echo "running this script again"
+ echo
+ exit
+fi
+
# if you do have svn commit access, change the protocol from svn:// to svn+ssh://USERNAME@ in the projects array for easier committing...
declare -A projects
declare -A web_pages