mirror of
https://github.com/Llewellynvdm/Joomla-XML-Lang-stream.git
synced 2024-12-18 03:24:08 +00:00
Code formating
This commit is contained in:
parent
d82aa6d4db
commit
91c09b5d1b
16
run.sh
16
run.sh
@ -25,8 +25,7 @@ function main() {
|
||||
exit 1
|
||||
fi
|
||||
# now get the mapper data
|
||||
while IFS=$'\t' read -r -a row
|
||||
do
|
||||
while IFS=$'\t' read -r -a row; do
|
||||
[[ "$row" =~ ^#.*$ ]] && continue
|
||||
# set the url
|
||||
URL_MAIN_LANG="${STREAM_ENDPOINT}&${URL_VERSION_KEY}=${row[0]}"
|
||||
@ -55,13 +54,12 @@ function main() {
|
||||
# do the work now
|
||||
wget -q "${URL_LANG}" --output-document="${PATH_FILE}"
|
||||
fi
|
||||
done < "${PATH_MAIN_FILE}"
|
||||
done < "$REPO_MAPPER"
|
||||
done <"${PATH_MAIN_FILE}"
|
||||
done <"$REPO_MAPPER"
|
||||
# check if we should update the repo
|
||||
if (("$PUSH" == 1)); then
|
||||
# we first check if there are changes
|
||||
if [[ -z $(git status --porcelain) ]];
|
||||
then
|
||||
if [[ -z $(git status --porcelain) ]]; then
|
||||
echo "Nothing to commit here"
|
||||
else
|
||||
# make sure all new files are added and others removed where needed
|
||||
@ -99,7 +97,7 @@ function completedBuildMessage() {
|
||||
|
||||
# our XML helpers
|
||||
# https://stackoverflow.com/a/7052168/1429677
|
||||
function readXML () {
|
||||
function readXML() {
|
||||
local IFS=\>
|
||||
read -d \< ENTITY CONTENT
|
||||
local ret=$?
|
||||
@ -107,8 +105,8 @@ function readXML () {
|
||||
ATTRIBUTES=${ENTITY#* }
|
||||
return $ret
|
||||
}
|
||||
function getElement () {
|
||||
if [[ $TAG_NAME = "extension" ]] ; then
|
||||
function getElement() {
|
||||
if [[ $TAG_NAME == "extension" ]]; then
|
||||
eval local $ATTRIBUTES
|
||||
echo "$element"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user