]> git.bzium.org/ - embe/overlay.git/blob - dev-util/adobe-air-sdk-bin/files/airstart
Aktualizacja app-portage/man-symlinker-9999
[embe/overlay.git] / dev-util / adobe-air-sdk-bin / files / airstart
1 #!/bin/sh
2
3 synopsis() {
4         echo "Synopsis: $0 appl.air" >&2
5         exit 1
6 }
7
8 [ -z "$1" ] && synopsis
9
10 tmpdir="$(mktemp -d /tmp/adobeair.XXXXXXXXXX)"
11
12 cleanup() {
13         rm -rf "${tmpdir}"
14 }
15
16 runair() {
17         if [ ! -f "$1" ]; then
18                 echo 'Specified application file not found:' "$1" >&2
19                 cleanup
20                 synopsis
21                 return 1
22         fi
23
24         if ! unzip -q "$1" -d "${tmpdir}"; then
25                 echo 'Unable to extract AIR application:' "$1" >&2
26                 return 1
27         fi
28
29         /opt/bin/adl -nodebug "${tmpdir}"/META-INF/AIR/application.xml "${tmpdir}"
30 }
31
32 trap cleanup HUP INT QUIT TERM
33 runair "$1"
34 cleanup