Last change
on this file since 29700 was 29700, checked in by Jeremy Symon, 9 years ago |
Changed ReadMe files to ReadMe.txt (as a hint for webservers to serve them as plaintext rather than broken HTML)
|
-
Property svn:executable
set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 |
|
---|
3 | . $(dirname $0)/conf.sh
|
---|
4 |
|
---|
5 | reprepro_check() {
|
---|
6 | cd $repos/apt/ || {
|
---|
7 | echo "Repository not found. Have you set it up?" >&2
|
---|
8 | exit 1
|
---|
9 | }
|
---|
10 | test -x `which reprepro` || {
|
---|
11 | echo "Must install reprepro to add packages" >&2
|
---|
12 | exit 1
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | help="Options:
|
---|
17 | setup
|
---|
18 | add </path/to/1.deb> ..."
|
---|
19 |
|
---|
20 | case $1 in
|
---|
21 | setup)
|
---|
22 | mkdir -p $repos || exit 1
|
---|
23 | echo
|
---|
24 | conf=$repos/apt/conf
|
---|
25 | echo "Making reprepro conf dir '$conf'"
|
---|
26 | mkdir -p $conf || exit 1
|
---|
27 | echo
|
---|
28 | keyid=$(get_gpg)
|
---|
29 | echo "Making reprepro distributions file"
|
---|
30 | echo "\
|
---|
31 | Origin: $origin
|
---|
32 | Label: $label
|
---|
33 | Codename: $codename
|
---|
34 | Architectures: $arch
|
---|
35 | Components: main
|
---|
36 | Description: $description
|
---|
37 | SignWith: $keyid" | write $conf/distributions
|
---|
38 | echo
|
---|
39 | echo "Making reprepro options file"
|
---|
40 | echo "\
|
---|
41 | verbose
|
---|
42 | ask-passphrase" | write $conf/options
|
---|
43 | echo
|
---|
44 | echo "Making ReadMe file"
|
---|
45 | echo "\
|
---|
46 | $setup_cmd_instruction
|
---|
47 |
|
---|
48 | echo 'deb http://$uri_root/apt $codename main' > /etc/apt/sources.list.d/greenstone.list
|
---|
49 | curl -L 'http://$uri_root/gpg.key' | apt-key add -
|
---|
50 | apt-get update
|
---|
51 |
|
---|
52 | $install_cmd_instruction
|
---|
53 |
|
---|
54 | sudo apt-get install greenstone
|
---|
55 | " > $repos/apt/ReadMe.txt
|
---|
56 | ;;
|
---|
57 | add)
|
---|
58 | reprepro_check
|
---|
59 | shift
|
---|
60 | reprepro includedeb $codename $@
|
---|
61 | ;;
|
---|
62 | -h|--help|help)
|
---|
63 | echo "$help"
|
---|
64 | ;;
|
---|
65 | *)
|
---|
66 | if test -z "$*"; then
|
---|
67 | echo "$help"
|
---|
68 | else
|
---|
69 | reprepro_check
|
---|
70 | reprepro $@
|
---|
71 | fi
|
---|
72 | ;;
|
---|
73 | esac
|
---|
Note:
See
TracBrowser
for help on using the repository browser.