Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/87529


Change subject: Make path names relative
......................................................................

Make path names relative

Change-Id: I44afe86d6b7bbc3da20cc87ae0f35544703cfc9e
---
M bin/repoupdate
1 file changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/29/87529/1

diff --git a/bin/repoupdate b/bin/repoupdate
index 095bc1e..b46536a 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -1,15 +1,17 @@
 #!/bin/bash
 set -e
 
+DIRBASE=$(dirname $0)
+DIRLOG=/home/betawiki/logs/repo
 PROJECT=$1
-DIR=$2
-: ${DIR:=`pwd`}
-source /home/betawiki/config/bin/findexportroot
-cd "$DIR"
-
 WIKI=/www/translatewiki.net/w
 
-echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> 
/home/betawiki/logs/repo
+DIR=$2
+: ${DIR:=`pwd`}
+source $DIRBASE/findexportroot
+cd "$DIR"
+
+echo "$(date --rfc-3339=seconds --utc) [$(whoami) at $DIR] $0 $@" >> $DIRLOG
 
 gitupdate() {
        local dir=$1
@@ -123,7 +125,7 @@
        wait
        if [ "$DIR" = "/resources/projects" ]
        then
-               sudo -u betawiki php 
"$WIKI/extensions/Translate/scripts/createMessageIndex.php" --quiet || 
/home/betawiki/config/bin/udpcast Message index creation failed &
+               sudo -u betawiki php 
"$WIKI/extensions/Translate/scripts/createMessageIndex.php" --quiet || 
${DIRBASE}/udpcast Message index creation failed &
        fi
 
 elif [ "$PROJECT" = "mediawiki-extensions" ]
@@ -159,7 +161,7 @@
                                cd ..
                        fi
                else
-                       /home/betawiki/config/bin/update-reset-repo 
"$DIR/$PROJECT/extensions/$EXTENSION" &
+                       ${DIRBASE}/update-reset-repo 
"$DIR/$PROJECT/extensions/$EXTENSION" &
                        let count+=1; [[ $((count%10)) -eq 0 ]] && wait
                fi
        done
@@ -168,7 +170,7 @@
        if [ -z "$REPO_RW" ]
        then
                sudo -u betawiki php 
"$WIKI/extensions/Translate/scripts/processMessageChanges.php" --quiet 
--groups=ext-* && echo "Please check 
https://translatewiki.net/wiki/Special:ManageMessageGroups";
-               sudo -u betawiki php 
"$WIKI/extensions/Translate/scripts/createMessageIndex.php" --quiet || 
/home/betawiki/config/bin/udpcast Message index creation failed &
+               sudo -u betawiki php 
"$WIKI/extensions/Translate/scripts/createMessageIndex.php" --quiet || 
${DIRBASE}/udpcast Message index creation failed &
        fi
 
 elif [ "$PROJECT" = "mozilla" ]

-- 
To view, visit https://gerrit.wikimedia.org/r/87529
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44afe86d6b7bbc3da20cc87ae0f35544703cfc9e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to