source: main/trunk/package-kits/linux/repos/conf.sh

Last change on this file was 29699, checked in by Jeremy Symon, 9 years ago

Changed uri config to include path as well as domain

File size: 1.1 KB
Line 
1origin="Greenstone"
2label="greenstone"
3codename="greenstone"
4uri_root='greenstone.org/repo'
5arch="i386 amd64 source"
6description="Repository for Greenstone packages"
7base=$(dirname $0)
8repos=$base/repos
9setup_cmd_instruction="To use this repository, run the following commands in a terminal as root:"
10install_cmd_instruction="You should now be able to install greenstone packages with:"
11
12y() {
13 echo "$@? [y|n]..." >&2
14 echo -n "> " >&2
15 read cho
16 test "$cho" = "y" -o "$cho" = "Y"
17 return $?
18}
19
20get() {
21 echo "$1? [$2]..." >&2
22 echo -n "> " >&2
23 read cho
24 test -z $cho && {
25 cho=$2
26 echo "Set to default '$cho'" >&2
27 }
28 echo $cho
29}
30
31write() {
32 file=$1
33 if touch $file 2>/dev/null; then
34 cat - > $file
35 else
36 cat - | sudo tee $file
37 fi
38}
39
40get_gpg() {
41 if test -f $base/gpg.key.id; then
42 keyid=$(cat $base/gpg.key.id)
43 else
44 gpg --list-keys >&2
45 echo "Enter the keyid of the GPG key to use:" >&2
46 while test -z $keyid; do
47 echo -n "> " >&2
48 read keyid
49 done
50 echo $keyid > $base/gpg.key.id
51 echo >&2
52 fi
53 echo $keyid
54}
Note: See TracBrowser for help on using the repository browser.