Split source to code and configs

This commit is contained in:
Kolan Sh 2012-04-16 16:01:02 +04:00
parent f052b04231
commit 6d7864dbab
4 changed files with 26 additions and 14 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
#VARS
DOC_PATH=/var/doc/redmine
TMP_PATH=/tmp/redmine-doxygen$RANDOM$RANDOM
# load config files
[ -f /etc/chiliproject_doxygen ] && source /etc/chiliproject_doxygen
[ -f ~/etc/chiliproject_doxygen ] && source ~/etc/chiliproject_doxygen
# table
project_id=
@ -14,8 +14,8 @@ identifier=
# UMASK
umask 0002
# read redmine.repositories to table
MYSQL_RESULT=`mysql -h127.0.0.1 -u redmine -e "SELECT project_id, type, root_url FROM redmine.repositories" | grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+4`
# read $MYSQL_DBNAME.repositories to table
MYSQL_RESULT=`mysql -h127.0.0.1 -u $MYSQL_USER -e "SELECT project_id, type, root_url FROM $MYSQL_DBNAME.repositories" | grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+4`
let n=0
for v in $MYSQL_RESULT; do
let idx=n/3
@ -28,8 +28,8 @@ for v in $MYSQL_RESULT; do
done;
let n/=3
# read redmine.projects to table
MYSQL_RESULT=`mysql -h127.0.0.1 -u redmine -e "SELECT id, identifier FROM redmine.projects" | grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+3`
# read $MYSQL_DBNAME.projects to table
MYSQL_RESULT=`mysql -h127.0.0.1 -u $MYSQL_USER -e "SELECT id, identifier FROM $MYSQL_DBNAME.projects" | grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+3`
last_idx=0
let i=0
for v in $MYSQL_RESULT; do

7
etc/chiliproject_doxygen Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
#
DOC_PATH=/var/doc/chiliproject
TMP_PATH=/tmp/chiliproject-doxygen$RANDOM$RANDOM
MYSQL_USER=chiliproject
MYSQL_DBNAME=chiliproject

9
etc/rhodecode_chiliproject Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
#
export LANG=ru_RU.UTF-8
RHODECODE_SQLITE_PATH=/home/rhodecode/rhodecode/rhodecode.db
CHILI_MYSQL_USER=redmine
CHILI_MYSQL_DBNAME=redmine
CHILI_MYSQL_HOSTNAME=127.0.0.1
CHILI_REQUIRED_ROLES="Ответственный Менеджер Major Manager"

View File

@ -1,12 +1,8 @@
#!/bin/bash
# VARS
export LANG=ru_RU.UTF-8
RHODECODE_SQLITE_PATH=/home/rhodecode/rhodecode/rhodecode.db
CHILI_MYSQL_USER=redmine
CHILI_MYSQL_DBNAME=redmine
CHILI_MYSQL_HOSTNAME=127.0.0.1
CHILI_REQUIRED_ROLES="Ответственный Менеджер Major Manager"
# load config files
[ -f /etc/rhodecode_chiliproject ] && source /etc/rhodecode_chiliproject
[ -f ~/etc/rhodecode_chiliproject ] && source ~/etc/rhodecode_chiliproject
# === REMOVE ALL BROKEN REPOSITORY LINKS IN REDMINE MYSQL DATABASE ===
ALL_MYSQL_REPOS=`mysql -h$CHILI_MYSQL_HOSTNAME -u $CHILI_MYSQL_USER -e "SELECT url,root_url,id FROM $CHILI_MYSQL_DBNAME.repositories WHERE type='Mercurial' OR type='Repository::Mercurial'" | grep -v tables_col|xargs|sed "s/ /\n/g"|tail -n+4`