Lahmizzar Muinela
2014-03-09 925555692e03e44e573d075b30196268c772bde4
commit | author | age
ee0fca 1 #!/bin/bash
LM 2
1fd179 3 # Copyright (C) 1997 - 2014 devXive - research and development
LM 4 #
5 # The scriptfile is licensed under the Apache License, Version 2.0 (the "License");
6 # You may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # The content of static vars and/or static echo output is licensed under the
18 # devXive Proprietary Use License (http://devxive.com/legal/license)
19 #
20 # Author:  devXive, Lahmizzar Muinela
21 # Email:   support@devxive.com
22 # Twitter: @devxive
23 # Website: http://devxive.com
24 #
25 #
26 # Description:
ee0fca 27 # Simple script to build an appropriate language manifest
LM 28 #
29 # How to use
30 # ./build update 4.2.0b4 2013-12-06 (Fetch Updates from transifex and create the install file)
31 # ./build 4.2.0b4 2013-12-06 (Create the install file from current languages folder)
32
1fd179 33 clear
LM 34
ee0fca 35 # Name as used in builder/create
LM 36 tempDir="pkg_projectfork_languages"
37 version="$2"
38
39 if [[ "$1" == "--help" || "$2" == "--help" || "$3" == "--help" || "$4" == "--help" ]]
40     then
41       echo 'How to use:'
42       echo '-----------'
43       echo 'Fetch updates from transifex first, then build the language installer package'
44       echo '  ./build update [version_number_to_set] [manual_build_date]'
45       echo '  EG: ./build update 4.2.0b4 2013-12-06'
46       echo ' '
47       echo 'Create the language installer package from current state (without updating languages from transifex first)'
48       echo '  ./build [version_number_to_set] [manual_build_date]'
49       echo '  EG: ./build noupdate 4.2.0b4 2013-12-06'
50       echo ' '
51       echo 'If you want tu use the current timestamp as build date'
52       echo '  ./build noupdate 4.2.0.4b'
53       echo 'or'
54       echo '  ./build update 4.2.0.4b'
55       echo ' '
56       echo ' '
57       echo 'This Help'
58       echo '  ./build --help'
59       echo ' '
60       echo ' '
61       echo 'To get advanced instructions on how to use the transifex client, you have to read the API. http://api.transifex.com.'
62     exit 1 
63   fi
64
65 if [[ "$1" == "" || "$2" == "" ]]
66     then
67       echo 'Error: Not all options set! Type "./build --help" to get more options'
68     exit 1 
69   fi
70
71 builder/create $1 $2 $3
72
73 # Create zip here to prevent deep folder creations in zip file // TODO: Fix this!
74 zip -r archive/zips/lang_pf4_$version.zip $tempDir/*
75 rm -rf "$tempDir"