|
@@ -14,14 +14,6 @@ _maybe() {
|
14
|
14
|
esac
|
15
|
15
|
}
|
16
|
16
|
|
17
|
|
-check_env() {
|
18
|
|
- #
|
19
|
|
- # Check that critical variables are set correctly
|
20
|
|
- #
|
21
|
|
- test -n "$destdir" || die "could not determine DESTDIR"
|
22
|
|
- test -d "$destdir" || die "DESTDIR: no such directory: $destdir"
|
23
|
|
-}
|
24
|
|
-
|
25
|
17
|
deploy_item() {
|
26
|
18
|
#
|
27
|
19
|
# Deploy item and make it look like wanted
|
|
@@ -58,18 +50,6 @@ deploy_item() {
|
58
|
50
|
fi
|
59
|
51
|
}
|
60
|
52
|
|
61
|
|
-get_destdir() {
|
62
|
|
- #
|
63
|
|
- # Get DESTDIR: first from ENV:DESTDIR, then the default
|
64
|
|
- #
|
65
|
|
- {
|
66
|
|
- ini 1value ENV:DESTDIR | grep . && return
|
67
|
|
- echo "$MKIT_DEFAULT_DESTDIR"
|
68
|
|
- } \
|
69
|
|
- | xargs readlink -m \
|
70
|
|
- | grep -m 1 .
|
71
|
|
-}
|
72
|
|
-
|
73
|
53
|
get_dst() {
|
74
|
54
|
#
|
75
|
55
|
# Find out target path for src file $2 of group $1
|
|
@@ -86,7 +66,7 @@ get_root() {
|
86
|
66
|
local grp="$1"
|
87
|
67
|
local root=$(ini 1value "roots:$grp")
|
88
|
68
|
test -n "$root" || die "missing in config.ini: roots:$grp"
|
89
|
|
- echo "$destdir/$root"
|
|
69
|
+ echo "$(ini 1value ENV:DESTDIR)$root"
|
90
|
70
|
}
|
91
|
71
|
|
92
|
72
|
install() {
|
|
@@ -94,8 +74,6 @@ install() {
|
94
|
74
|
# Install product
|
95
|
75
|
#
|
96
|
76
|
local dst group mode src
|
97
|
|
- local destdir=$(get_destdir)
|
98
|
|
- check_env
|
99
|
77
|
ini values "lists:group" \
|
100
|
78
|
| while read group;
|
101
|
79
|
do
|
|
@@ -116,8 +94,6 @@ uninstall() {
|
116
|
94
|
# Uninstall product
|
117
|
95
|
#
|
118
|
96
|
local dst group src
|
119
|
|
- local destdir=$(get_destdir)
|
120
|
|
- check_env
|
121
|
97
|
ini values "lists:group" \
|
122
|
98
|
| while read group;
|
123
|
99
|
do
|