Lahmizzar Muinela
2014-01-07 0251a9aac9cae56d046de9637504fa9b77b2103c
commit | author | age
ee0fca 1 #!/bin/bash
LM 2 clear
3   ######################################
4   # Author: devXive, Lahmizzar Muinela #
5   # Email: support@devxive.com         #
6   # Twitter: @devXive                  #
7   # Website: http://www.devxive.com    #
8   ######################################
9
10 # Simple script to build an appropriate language manifest
11 #
12 # How to use
13 # ./build update 4.2.0b4 2013-12-06 (Fetch Updates from transifex and create the install file)
14 # ./build 4.2.0b4 2013-12-06 (Create the install file from current languages folder)
15
16 # Name as used in builder/create
17 tempDir="pkg_projectfork_languages"
18 version="$2"
19
20 if [[ "$1" == "--help" || "$2" == "--help" || "$3" == "--help" || "$4" == "--help" ]]
21     then
22       echo 'How to use:'
23       echo '-----------'
24       echo 'Fetch updates from transifex first, then build the language installer package'
25       echo '  ./build update [version_number_to_set] [manual_build_date]'
26       echo '  EG: ./build update 4.2.0b4 2013-12-06'
27       echo ' '
28       echo 'Create the language installer package from current state (without updating languages from transifex first)'
29       echo '  ./build [version_number_to_set] [manual_build_date]'
30       echo '  EG: ./build noupdate 4.2.0b4 2013-12-06'
31       echo ' '
32       echo 'If you want tu use the current timestamp as build date'
33       echo '  ./build noupdate 4.2.0.4b'
34       echo 'or'
35       echo '  ./build update 4.2.0.4b'
36       echo ' '
37       echo ' '
38       echo 'This Help'
39       echo '  ./build --help'
40       echo ' '
41       echo ' '
42       echo 'To get advanced instructions on how to use the transifex client, you have to read the API. http://api.transifex.com.'
43     exit 1 
44   fi
45
46 if [[ "$1" == "" || "$2" == "" ]]
47     then
48       echo 'Error: Not all options set! Type "./build --help" to get more options'
49     exit 1 
50   fi
51
52 builder/create $1 $2 $3
53
54 # Create zip here to prevent deep folder creations in zip file // TODO: Fix this!
55 zip -r archive/zips/lang_pf4_$version.zip $tempDir/*
56 rm -rf "$tempDir"