-
Notifications
You must be signed in to change notification settings - Fork 2
/
portz_make
executable file
·54 lines (44 loc) · 1.12 KB
/
portz_make
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
#!/bin/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-make
set -e
portz_root=${portz_libdir-`pwd`}
. ${portz_root}/scripts/defs.sh
for x in "$@" ; do
echo "$0: $x"
eval $x
done
portz_prompt()
{
local x=$(eval echo \$$1)
if [ -n "$x" ]; then
printf "%35s: %s\n" "$2" "$x"
else
printf "%35s: " "$2"
read $1
fi
}
portz_prompt name "Name of package (unix-like name)"
portz_prompt website "WebSite"
portz_prompt version "Version"
portz_prompt baseurl "URL"
portz_file=${portz_root}/repo/$name.portz
if [ -f $portz_file ] ; then
echo "$0: $name portz already exists in repo" 1>&2
exit 1
fi
(
echo "version=$version"
echo baseurl="$(echo $baseurl | sed -e s,$version,\${version},)"
echo web="$website"
echo stereotype="$stereotype"
) | tee repo/$name.portz
# jedit: :tabSize=8:indentSize=4:noTabs=true:mode=shellscript: