blob: db76d6c0232690098a59b67a08e156d28f983d87 (
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
|
#!/bin/sh
synopsis() {
echo "Synopsis: $0 appl.air" >&2
exit 1
}
[ -z "$1" ] && synopsis
tmpdir="$(mktemp -d /tmp/adobeair.XXXXXXXXXX)"
cleanup() {
rm -rf "${tmpdir}"
}
runair() {
if [ ! -f "$1" ]; then
echo 'Specified application file not found:' "$1" >&2
cleanup
synopsis
return 1
fi
if ! unzip -q "$1" -d "${tmpdir}"; then
echo 'Unable to extract AIR application:' "$1" >&2
return 1
fi
/opt/bin/adl -nodebug "${tmpdir}"/META-INF/AIR/application.xml "${tmpdir}"
}
trap cleanup HUP INT QUIT TERM
runair "$1"
cleanup
|