-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathbuild
executable file
·75 lines (68 loc) · 2.59 KB
/
build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/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: [email protected]
# 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"