Correct paths for Git repos and check for .hg dir when remove repos

This commit is contained in:
Kolan Sh 2012-04-18 15:49:45 +04:00
parent 95dc0c4d80
commit a72838a956
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ for v in $CHILI_ID_GITORIOUS_REPO; do
let idx=n/2
case $((n%2)) in
0) chili_project_id=$v ;;
1) gitorious_path=$GITORIOUS_REPOS_PATH/$v
1) gitorious_path=$GITORIOUS_REPOS_PATH/$v.git
echo "insert $chili_project_id: $gitorious_path"
mysql -h$CHILI_MYSQL_HOSTNAME -u $CHILI_MYSQL_USER -e "INSERT INTO $CHILI_MYSQL_DBNAME.repositories(project_id,
url,

View File

@ -21,7 +21,7 @@ for v in $ALL_MYSQL_REPOS; do
case $((n%3)) in
0) current_url=$v;;
1) current_root_url=$v;;
2) [ ! -d $current_url -a ! -d $current_root_url ] && repos_to_remove="$repos_to_remove,$v";;
2) [ ! -d $current_url/.hg -a ! -d $current_root_url/.hg ] && repos_to_remove="$repos_to_remove,$v";;
esac
let n++
done;