blob: acac130c07ba741787a6abe7fb49650bf00bcbd9 (
plain) (
blame)
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
|
#!/bin/sh
PKG="$1"
DESTDIR="$2"
SVDIR="${DESTDIR}"/etc/s6/sv
ADMINSVDIR="${DESTDIR}"/etc/s6/adminsv
FALLBACKSVDIR="${DESTDIR}"/etc/s6/fallbacksv
CONFDIR="${DESTDIR}"/etc/s6/config
for dir in "$PKG"/*; do
if [ -d "$dir" ]; then
dirname=$(basename "$dir")
# This needs to go to adminsv and fallbacksv.
if [ "$dirname" = "mount-filesystems" ]; then
TOPDIR="${ADMINSVDIR}"
else
TOPDIR="${SVDIR}"
fi
for subdir in "$dir"/*; do
if [ -d "$subdir" ]; then
subdirname=$(basename "$subdir")
install -v -d "${TOPDIR}"/"$dirname"/"$subdirname"
for file in "$subdir"/*; do
install -v -m644 "$file" "${TOPDIR}"/"$dirname"/"$subdirname"
done
fi
done
install -v -d "${TOPDIR}"/"$dirname"
for file in "$dir"/*; do
install -v -m644 "$file" "${TOPDIR}"/"$dirname"
done
if [ ${TOPDIR} = ${ADMINSVDIR} ]; then
install -v -d "${FALLBACKSVDIR}"/"$dirname"
cp -ar ${TOPDIR}/"$dirname" ${FALLBACKSVDIR}/"$dirname"
fi
fi
done
if [ -e "$PKG"/*.conf ]; then
for conf in "$PKG"/*.conf; do
install -v -d "${CONFDIR}"
install -v -m644 "$conf" "${CONFDIR}"/"$PKG".conf
done
fi
|