1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
+
+
+
+
+
+
+
-
+
+
-
-
+
+
|
#! /usr/bin/env bash
if [ "$1" == '--cpio' ]; then
mode='file'
pkgfile="$1"
else
mode='dir'
pkgsdir="$1"
pkgsdir="$1"
fi
appfsdir="$2"
if [ -z "${pkgsdir}" -o -z "${appfsdir}" ]; then
echo 'Usage: appfs-mk <pkgsdir> <appfsdir>' >&2
if [ -z "${pkgsdir}" -a -z "${pkgfile}" ] || [ -z "${appfsdir}" ]; then
echo 'Usage: appfs-mk {--cpio <pkgfile>|<pkgsdir>} <appfsdir>' >&2
exit 1
fi
appfsdir="$(cd "${appfsdir}" && pwd)"
if [ -z "${appfsdir}" ]; then
echo "Unable to find appfs directory." >&2
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
+
+
-
+
+
+
+
+
+
+
|
echo "${type},${stat_data},${filename}"
else
echo "${type},${stat_data},${extra_data},${filename}"
fi
done
}
case "${mode}" in
dir)
cd "${pkgsdir}" || exit 1
cd "${pkgsdir}" || exit 1
;;
file)
echo 'Unsupported' >&2
exit 1
;;
esac
packagelistfile="${appfsdir}/sha1/${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM}.tmp"
for package in *; do
(
cd "${package}" || exit 1
for os_cpuArch in *; do
|