File: postinst

package info (click to toggle)
google-android-emulator-installer 30.0.12%2B1
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 136 kB
  • sloc: sh: 58; makefile: 41
file content (40 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download
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
#!/bin/sh

set -e

PKG_NAME="emulator"
INS_DIR=""
TRG_DIR="android-sdk/"
PKG_SOURCE="emulator-linux-6466327.zip"

# Source debconf library.
. /usr/share/debconf/confmodule
db_get google-android-installers/mirror

case "$1" in
    configure)
        if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
            db_fset google-android-installers/mirror seen false
            db_input high google-android-installers/mirror || true
            db_go || true
        else
            install -d -m0700 -o nobody -g nogroup /var/cache/google-android-"$PKG_NAME"-installer
            cp /usr/share/google-android-"$PKG_NAME"-installer/Makefile \
               /usr/share/google-android-"$PKG_NAME"-installer/"$PKG_SOURCE".sha1 \
               /var/cache/google-android-"$PKG_NAME"-installer/
            make -C /var/cache/google-android-"$PKG_NAME"-installer/ DL_MIRROR="$RET" PKG_NAME="$PKG_NAME" TRG_DIR="$TRG_DIR" INS_DIR="$INS_DIR" PKG_SOURCE="$PKG_SOURCE" install
	fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

#DEBHELPER#

exit 0