Skip to content

Commit

Permalink
Use compare-locales for parsing product repositories (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo committed Nov 29, 2016
1 parent c9bb9a4 commit 6a4994d
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 156 deletions.
4 changes: 2 additions & 2 deletions app/scripts/glossaire.sh
Expand Up @@ -154,9 +154,9 @@ function updateStandardRepo() {
echogreen "Create ${repo_name^^} cache for $repo_name/$1"
if [ "$1" = "en-US" ]
then
nice -20 $install/app/scripts/tmx_products.py ${!repo_source}/COMMUN/ ${!repo_source}/COMMUN/ en-US en-US $repo_name
nice -20 $install/app/scripts/tmx_products.py ${!repo_source}/COMMUN/ en-US en-US $repo_name
else
nice -20 $install/app/scripts/tmx_products.py ${!repo_l10n}/$1/ ${!repo_source}/COMMUN/ $1 en-US $repo_name
nice -20 $install/app/scripts/tmx_products.py ${!repo_l10n}/$1/ $1 en-US $repo_name
fi
}

Expand Down
27 changes: 16 additions & 11 deletions app/scripts/setup.sh
Expand Up @@ -74,26 +74,32 @@ function createSymlinks() {
esac
}

function checkoutSilme() {
# Check out SILME library to a specific version (0.8.0)
if [ ! -d $libraries/silme/.hg ]
function setupExternalLibraries() {
# Check out or update compare-locales library
version="RELEASE_1_2_1"
if [ ! -d $libraries/compare-locales/.hg ]
then
echogreen "Checking out the SILME library into $libraries"
echogreen "Checking out compare-locales in $libraries"
cd $libraries
hg clone https://hg.mozilla.org/l10n/silme -u silme-0.8.0
hg clone https://hg.mozilla.org/l10n/compare-locales -u $version
cd $install
else
echogreen "Updating compare-locales in $libraries"
cd $libraries/compare-locales
hg pull -r default --update
hg update $version
cd $install
fi
}

function setupP12nExtract() {
# Check out or update external p12n-extract library
if [ ! -d $libraries/p12n/.git ]
then
echogreen "Checking out the p12n-extract library into $libraries"
echogreen "Checking out the p12n-extract library in $libraries"
cd $libraries
git clone https://github.com/flodolo/p12n-extract/ p12n
cd $install
else
echogreen "Updating the p12n-extract library into $libraries"
echogreen "Updating the p12n-extract library in $libraries"
cd $libraries/p12n
git pull
cd $install
Expand Down Expand Up @@ -246,8 +252,7 @@ else
fi
echo "${CURRENT_TIP:0:7}${DEV_VERSION}" > "${install}/cache/version.txt"

checkoutSilme
setupP12nExtract
setupExternalLibraries

initDesktopSourceRepo "central"
initDesktopSourceRepo "release"
Expand Down

0 comments on commit 6a4994d

Please sign in to comment.