blob: 79ee65a4fae346daa5f01e838764b608345dbca5 (
plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# based on gcc-config by Martin Schlemmer <azarah@gentoo.org
# Author: Heinrich Wendel <lanius@gentoo.org>
source /etc/init.d/functions.sh || {
echo "$0: Could not source /etc/init.d/functions.sh!"
exit 1
}
umask 022
PROFILE_PATH=/usr/$(get_libdir)/motif
CONFIG_FILE=${PROFILE_PATH}/current
usage() {
cat << "USAGE_END"
Usage: motif-config [options] [Profile]
Change the current motif profile, or give info about profiles.
Options:
-c, --get-current-profile Print current used motif profile.
-l, --list-profiles Print a list of available profiles.
-L, --get-lib-path Print path where libraries of the given/current
profile are located.
-I, --get-inc-path Print path where includes of the given/current
profile are located.
--libs Print link flags for the given/current
profile.
--cflags Print compilation flags for the given/current
profile.
--install Install the given profile.
--uninstall Uninstall the given profile.
USAGE_END
exit $1
}
[[ $# -lt 1 ]] && usage 1
get_current_profile() {
exit 0
}
switch_profile() {
exit 0
}
list_profiles() {
exit 0
}
get_lib_path() {
exit 0
}
get_inc_path() {
exit 0
}
for x in "$@"; do
case "${x}" in
-l|--list-profiles)
;;
-L|--get-lib-path)
;;
-I|--get-inc-path)
;;
--clfags)
;;
--ldflags)
;;
--install)
;;
--uninstall)
;;
-h|--help)
usage 0
exit 0
;;
-v|--version)
echo "motif-config-1.0"
exit 0
;;
-*)
eerror "$0: Invalid switch! Run $0 without parameters for help."
exit 1
;;
*)
# switch profile
;;
esac
done
|