]>
Commit | Line | Data |
---|---|---|
df5e82b3 | 1 | #!/bin/bash |
60caa2d0 MT |
2 | ############################################################################### |
3 | # # | |
4 | # IPFire.org - A linux based firewall # | |
5 | # Copyright (C) 2007, 2008, 2009 Michael Tremer & Christian Schmidt # | |
6 | # # | |
7 | # This program is free software: you can redistribute it and/or modify # | |
8 | # it under the terms of the GNU General Public License as published by # | |
9 | # the Free Software Foundation, either version 3 of the License, or # | |
10 | # (at your option) any later version. # | |
11 | # # | |
12 | # This program is distributed in the hope that it will be useful, # | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
15 | # GNU General Public License for more details. # | |
16 | # # | |
17 | # You should have received a copy of the GNU General Public License # | |
18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
19 | # # | |
20 | ############################################################################### | |
df5e82b3 MT |
21 | # |
22 | ||
166a6c21 MT |
23 | NAME="IPFire" # Software name |
24 | SNAME="ipfire" # Short name | |
25 | VERSION="3.0-prealpha2" # Version number | |
26 | SLOGAN="Gluttony" # Software slogan | |
27 | ||
28 | BASEDIR=/ipfire-3.x | |
29 | ||
30 | . ${BASEDIR}/tools/ui-functions | |
31 | ||
32 | NAOKI=${BASEDIR}/tools/naoki | |
33 | ||
34 | while [ $# -gt 0 ]; do | |
35 | case "${1}" in | |
36 | --debug|-d) | |
37 | DEBUG=1 | |
38 | log DEBUG "Debugging mode enabled by command line." | |
39 | ;; | |
40 | *) | |
41 | action=${1} | |
42 | shift | |
43 | break | |
44 | ;; | |
45 | esac | |
46 | shift | |
47 | done | |
48 | ||
49 | function package() { | |
50 | local action=${1} | |
51 | shift | |
52 | ||
53 | case "${action}" in | |
54 | dependencies|deps) | |
55 | echo -e "${BOLD}Build dependencies:${NORMAL} $(package_build_dependencies $@)" | |
56 | echo -e "${BOLD}Dependencies:${NORMAL} $(package_dependencies $@)" | |
57 | ;; | |
58 | find) | |
59 | find_package $@ | |
60 | ;; | |
61 | list) | |
62 | ${NAOKI} --toolchain list | |
63 | ;; | |
64 | profile|info) | |
65 | ${NAOKI} profile $@ | |
66 | ;; | |
67 | _info) | |
68 | package_info $(find_package $@) | |
69 | ;; | |
70 | esac | |
ca8da28e | 71 | } |
df5e82b3 | 72 | |
166a6c21 MT |
73 | function listmatch() { |
74 | local arg=${1} | |
75 | shift | |
a97daddb | 76 | |
166a6c21 MT |
77 | local value |
78 | for value in $@; do | |
79 | if [ "${arg}" == "${value}" ]; then | |
80 | return 0 | |
485f0a3b | 81 | fi |
166a6c21 MT |
82 | done |
83 | return 1 | |
df5e82b3 MT |
84 | } |
85 | ||
166a6c21 MT |
86 | |
87 | case "${action}" in | |
88 | package|pkg) | |
89 | package $@ | |
90 | ;; | |
91 | toolchain) | |
92 | TOOLCHAIN=1 | |
93 | ${NAOKI} --toolchain tree | |
94 | ;; | |
95 | toolchain_build) | |
96 | for i in $($0 toolchain); do | |
97 | ${NAOKI} --toolchain toolchain ${i} | |
98 | done | |
99 | ;; | |
100 | tree) | |
101 | ${NAOKI} tree | |
102 | ;; | |
103 | esac |