Skip to content
Snippets Groups Projects
Commit 01d50888 authored by Guiu Rocafort Ferrer's avatar Guiu Rocafort Ferrer
Browse files

Build scripts modfied to accept languages to build

via command line parameters.
parent 75466973
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,11 @@
# This script builds PDF, ePub, and Mobi output for the guide.
# See README.txt for notes about fonts and languages.
# Usage:
# "./mkebooks.sh" without parameters will build all the languages defined in languages.txt
# "./mkebooks.sh lang1 lang2 lang3" will build the documentation for all the languages passed as parameters.
# lang1 lang2 lang3 represent valid language codes.
# Exit immediately on uninitialized variable or error, and print each command.
set -uex
......@@ -11,8 +16,16 @@ mkdir -p ../output
mkdir -p ../output/ebooks
mkdir -p ../ebooks
if [[ $# -gt 0 ]]; then
echo "Building specified languages in parameters"
langs=$*
else
echo "Building all languages in languages.txt"
langs="$(cat languages.txt)"
fi
# Process each language. Add new languages to the languages.txt file.
for lang in `cat languages.txt`
for lang in $langs
do
# Make output directories.
......
......@@ -3,6 +3,11 @@
# This script builds the AsciiDoc Display Feeds module output for the
# guidelines and user guide.
# Usage:
# "./mkfeeds.sh" without parameters will build all the languages defined in languages.txt
# "./mkfeeds.sh lang1 lang2 lang3" will build the documentation for all the languages passed as parameters.
# lang1 lang2 lang3 represent valid language codes.
# Exit immediately on uninitialized variable or error, and print each command.
set -uex
......@@ -10,8 +15,16 @@ set -uex
mkdir -p ../output
mkdir -p ../output/html_feed
if [[ $# -gt 0 ]]; then
echo "Building specified languages in parameters"
langs=$*
else
echo "Building all languages in languages.txt"
langs="$(cat languages.txt)"
fi
# Process each language. Add new languages to the languages.txt file.
for lang in `cat languages.txt`
for lang in $langs
do
# Make output directories.
......
......@@ -3,6 +3,11 @@
# This script builds the AsciiDoc Display Direct module output for the
# guidelines and user guide.
# Usage:
# "./mkoutput.sh" without parameters will build all the languages defined in languages.txt
# "./mkoutput.sh lang1 lang2 lang3" will build the documentation for all the languages passed as parameters.
# lang1 lang2 lang3 represent valid language codes.
# Exit immediately on uninitialized variable or error, and print each command.
set -uex
......@@ -10,8 +15,16 @@ set -uex
mkdir -p ../output
mkdir -p ../output/html
if [[ $# -gt 0 ]]; then
echo "Building specified languages in parameters"
langs=$*
else
echo "Building all languages in languages.txt"
langs="$(cat languages.txt)"
fi
# Process each language. Add new languages to the languages.txt file.
for lang in `cat languages.txt`
for lang in $langs
do
mkdir -p ../output/html/$lang
......
#!/usr/bin/env bash
# This script takes the ebooks created by mkebooks.sh, and makes zip files.
# Usage: ./mkzips.sh version
# Example: ./mkzips.sh 8.x-7.1
# Usage: ./mkzips.sh version [ lang1 lang2 lang3 ]
# Example: ./mkzips.sh 8.x-7.1 es de it
# Exit immediately on uninitialized variable or error, and print each command.
set -uex
if [[] $# -lt 1 ]]; then
echo "You must specify at least one parameter indicating the version"
echo "Usage: ./mkzips.sh version [ lang1 lang2 lang3 ]"
exit -1
fi
# Make output directory if it does not exist.
mkdir -p ../ebooks/zips
mkdir -p ../ebooks/zips/$1
cd ../ebooks
if [[ $# -gt 1 ]]; then
echo "Building specified languages in parameters"
langs=${@:2} # This gets all the parameters except the first one ( version )
else
echo "Building all languages in languages.txt"
langs="$(cat ../scripts/languages.txt)"
fi
# Process each language. Add new languages to the languages.txt file.
for lang in `cat ../scripts/languages.txt`
for lang in $langs
do
tar cvzf zips/$1/ebooks-$lang-$1.tgz guide-$lang.*
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment