File: unpack_arch

package info (click to toggle)
distributed-net-pproxy 280-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 688 kB
  • ctags: 2
  • sloc: sh: 138; perl: 116; makefile: 50
file content (45 lines) | stat: -rw-r--r-- 901 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
#
# Unpack the file(s) for the build architecture into tmp directory.
# Once this script is complete, files/ will hold the personal proxy, changelog,
# and may contain other doc files in doc/*.

mkdir tmp
mkdir files
mkdir files/docs
cd tmp

if [ ! "$1" ]; then
	arch=`dpkg --print-architecture`
else
	arch=$1
fi

case "$arch" in
  i386)
	file=rc5desproxyper-*-linux-x86.tar.gz
	binary=rc5desproxyper
	conffile=rc5desproxyper.ini
	otherdoc=readme.txt
  ;;
  alpha)
	file=rc5desproxyper-*-linux-alpha.tar.gz
	binary=rc5desproxyper
	conffile=rc5desproxyper.ini
	otherdoc=readme.txt
  ;;
esac

if [ "$file" ]; then
	tar zxvf ../$file
else
	echo $arch architecture not supported >&2
	exit 1
fi

#mv $changelog ../files/changelog
mv $binary ../files/distributed-net-pproxy
mv $conffile ../files/docs/distributed-net-pproxy.ini-sample
if [ ! -z "$otherdoc" ]; then
	mv $otherdoc ../files/docs/
fi