#!/bin/bash
|
|
# Copyright (C) 1997 - 2014 devXive - research and development
|
#
|
# The scriptfile is licensed under the Apache License, Version 2.0 (the "License");
|
# You may not use this file except in compliance with the License.
|
# You may obtain a copy of the License at
|
#
|
# http://www.apache.org/licenses/LICENSE-2.0
|
#
|
# Unless required by applicable law or agreed to in writing, software
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# See the License for the specific language governing permissions and
|
# limitations under the License.
|
#
|
# The content of static vars and/or static echo output is licensed under the
|
# devXive Proprietary Use License (http://devxive.com/legal/license)
|
#
|
# Author: devXive, Lahmizzar Muinela
|
# Email: support@devxive.com
|
# Twitter: @devxive
|
# Website: http://devxive.com
|
#
|
#
|
# Description:
|
# Simple script to build an appropriate language manifest
|
#
|
# How to use
|
# ./build update 4.2.0b4 2013-12-06 (Fetch Updates from transifex and create the install file)
|
# ./build 4.2.0b4 2013-12-06 (Create the install file from current languages folder)
|
|
clear
|
|
# Name as used in builder/create
|
tempDir="pkg_projectfork_languages"
|
version="$2"
|
|
if [[ "$1" == "--help" || "$2" == "--help" || "$3" == "--help" || "$4" == "--help" ]]
|
then
|
echo 'How to use:'
|
echo '-----------'
|
echo 'Fetch updates from transifex first, then build the language installer package'
|
echo ' ./build update [version_number_to_set] [manual_build_date]'
|
echo ' EG: ./build update 4.2.0b4 2013-12-06'
|
echo ' '
|
echo 'Create the language installer package from current state (without updating languages from transifex first)'
|
echo ' ./build [version_number_to_set] [manual_build_date]'
|
echo ' EG: ./build noupdate 4.2.0b4 2013-12-06'
|
echo ' '
|
echo 'If you want tu use the current timestamp as build date'
|
echo ' ./build noupdate 4.2.0.4b'
|
echo 'or'
|
echo ' ./build update 4.2.0.4b'
|
echo ' '
|
echo ' '
|
echo 'This Help'
|
echo ' ./build --help'
|
echo ' '
|
echo ' '
|
echo 'To get advanced instructions on how to use the transifex client, you have to read the API. http://api.transifex.com.'
|
exit 1
|
fi
|
|
if [[ "$1" == "" || "$2" == "" ]]
|
then
|
echo 'Error: Not all options set! Type "./build --help" to get more options'
|
exit 1
|
fi
|
|
builder/create $1 $2 $3
|
|
# Create zip here to prevent deep folder creations in zip file // TODO: Fix this!
|
zip -r archive/zips/lang_pf4_$version.zip $tempDir/*
|
rm -rf "$tempDir"
|