-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathportz_packback
executable file
·54 lines (40 loc) · 1.35 KB
/
portz_packback
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
#!/usr/bin/env bash
#
# This file is part of 'portz'
#
# Copyright (C) Zbigniew Zagorski <z.zagorski@gmail.com> and others,
# licensed to the public under the terms of the GNU GPL (>= 2)
# see the file COPYING for details
#
# I.e., do what you like, but keep copyright and there's NO WARRANTY.
#
PNAME=portz-packback
set -e
portz_libdir=${portz_libdir-`pwd`}
. ${portz_libdir}/scripts/runtime.sh
. ${portz_scripts}/functions.sh
. ${portz_scripts}/build_defs.sh
. ${portz_scripts}/package_defs.sh
package_name=$1
setup_package_build_defs
if [ ! -f ${manifest_file} ] ; then
fail "manifest file not found (expecting ${manifest_file}"
fi
inform "found manifest file: ${manifest_file}"
if [ -f "$pkginfo_file" ] ; then
inform "found package info file: ${pkginfo_file}"
portz_show_pkginfo $package_name
package_version="$(egrep ^version= $pkginfo_file | cut -d= -f2-)"
fi
if [ -z "$package_version" ] ; then
inform "package _version: not found, please set \$package_version; now falling back to 'unknown'"
package_version=unknown
else
inform "package version found: $package_version"
fi
filename=${package_name}-${package_version}${dist_suffix}.tar.gz
filename2="$(pwd)/$filename"
cd ${prefix}
cat ${manifest_file} | xargs tar chofz ${filename2}
inform "created ${filename}"
# jedit: :tabSize=8:indentSize=4:noTabs=true:mode=shellscript: