File: installsrc.in

package info (click to toggle)
linbot 0.8-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 140 kB
  • ctags: 5
  • sloc: sh: 602; makefile: 126; perl: 7
file content (59 lines) | stat: -rw-r--r-- 1,486 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
#
# source:
#   /var/cvs/projects/debian/linbot/debian/dpkg.scripts/installsrc.in,v
#
# revision:
#   @(#) installsrc.in,v 1.3 1998/09/13 13:40:53 jplejacq Exp
#
# copyright:
#   Copyright (C) 1998 Jean Pierre LeJacq <jplejacq@quoininc.com>
#
#   Distributed under the GNU GENERAL PUBLIC LICENSE.
#
# synopsis:
#   installsrc -p <DH_DOPACKAGES> -P <DH_TMPDIR>
#
# description:
#   Install src locally from remote site.
#
#   I've implemented argument parsing with the debhelper package.  The
#   sourced file, dh_lib, will define the two arguments.  Currently
#   the arguments are not used.
#
#   This program is package dependent.


# main:
  set -e


  if [ -x "/usr/bin/wget" ]
  then
    echo "${0}: getting package sources..."
      wget @@url_pkg_src@@
      wget @@url_pkg_dir@@/docs.html
      wget @@url_pkg_dir@@/linbot.gif
      wget @@url_pkg_dir@@/navbar.gif
      wget @@url_pkg_dir@@/blackbar.gif

      tar -z -x --preserve -f @@f_pkg_src@@
      rm @@f_pkg_src@@

      mv docs.html @@f_pkg_src_unpacked@@
      mv linbot.gif @@f_pkg_src_unpacked@@
      mv navbar.gif @@f_pkg_src_unpacked@@
      mv blackbar.gif @@f_pkg_src_unpacked@@

      tar -c --preserve -f @@f_pkg_src_unpacked@@.tar @@f_pkg_src_unpacked@@
      gzip --best @@f_pkg_src_unpacked@@.tar
      rm -r @@f_pkg_src_unpacked@@

      mv ./@@f_pkg_src@@ ../@@pkg@@-@@ver@@.orig.tar.gz
  else
    echo "${0}: unable to install source: /usr/bin/wget not available."
    exit 1
  fi


  exit 0