From ae4ca2724f9509fdfaae83e2b475a15986daea8d Mon Sep 17 00:00:00 2001 From: Remco Rijnders Date: Thu, 16 Aug 2012 06:27:05 +0000 Subject: Split off user configuration into a seperate file which is created upon first run. --- check_for_translation_work.sh | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'check_for_translation_work.sh') 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 -- cgit v1.2.1