Split source to code and configs
This commit is contained in:
parent
f052b04231
commit
6d7864dbab
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#VARS
|
# load config files
|
||||||
DOC_PATH=/var/doc/redmine
|
[ -f /etc/chiliproject_doxygen ] && source /etc/chiliproject_doxygen
|
||||||
TMP_PATH=/tmp/redmine-doxygen$RANDOM$RANDOM
|
[ -f ~/etc/chiliproject_doxygen ] && source ~/etc/chiliproject_doxygen
|
||||||
|
|
||||||
# table
|
# table
|
||||||
project_id=
|
project_id=
|
||||||
|
@ -14,8 +14,8 @@ identifier=
|
||||||
# UMASK
|
# UMASK
|
||||||
umask 0002
|
umask 0002
|
||||||
|
|
||||||
# read redmine.repositories to table
|
# read $MYSQL_DBNAME.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`
|
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
|
let n=0
|
||||||
for v in $MYSQL_RESULT; do
|
for v in $MYSQL_RESULT; do
|
||||||
let idx=n/3
|
let idx=n/3
|
||||||
|
@ -28,8 +28,8 @@ for v in $MYSQL_RESULT; do
|
||||||
done;
|
done;
|
||||||
let n/=3
|
let n/=3
|
||||||
|
|
||||||
# read redmine.projects to table
|
# read $MYSQL_DBNAME.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`
|
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
|
last_idx=0
|
||||||
let i=0
|
let i=0
|
||||||
for v in $MYSQL_RESULT; do
|
for v in $MYSQL_RESULT; do
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
|
||||||
|
DOC_PATH=/var/doc/chiliproject
|
||||||
|
TMP_PATH=/tmp/chiliproject-doxygen$RANDOM$RANDOM
|
||||||
|
MYSQL_USER=chiliproject
|
||||||
|
MYSQL_DBNAME=chiliproject
|
|
@ -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"
|
|
@ -1,12 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# VARS
|
# load config files
|
||||||
export LANG=ru_RU.UTF-8
|
[ -f /etc/rhodecode_chiliproject ] && source /etc/rhodecode_chiliproject
|
||||||
RHODECODE_SQLITE_PATH=/home/rhodecode/rhodecode/rhodecode.db
|
[ -f ~/etc/rhodecode_chiliproject ] && source ~/etc/rhodecode_chiliproject
|
||||||
CHILI_MYSQL_USER=redmine
|
|
||||||
CHILI_MYSQL_DBNAME=redmine
|
|
||||||
CHILI_MYSQL_HOSTNAME=127.0.0.1
|
|
||||||
CHILI_REQUIRED_ROLES="Ответственный Менеджер Major Manager"
|
|
||||||
|
|
||||||
# === REMOVE ALL BROKEN REPOSITORY LINKS IN REDMINE MYSQL DATABASE ===
|
# === 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`
|
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`
|
||||||
|
|
Loading…
Reference in New Issue