File: sources.postinst.in

package info (click to toggle)
google-android-installers 1743526702-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 1,184 kB
  • sloc: xml: 9,711; sh: 1,753; makefile: 266
file content (36 lines) | stat: -rw-r--r-- 999 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
#!/bin/sh

set -e

PKG_NAME="sources-%VER%"
INS_DIR="android-sdk/%PATH_DIRNAME%/"
TRG_DIR="%PATH_BASENAME%"
REPO_DIR="%REPO_DIR%"
PKG_SOURCE="%ZIPFILE%"

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

case "$1" in
  configure)
    if [ ! "${DEBCONF_RECONFIGURE}" = "1" ]; then
      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" REPO_DIR="$REPO_DIR" 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