3 # poldek-config - poldek(1) configuration program
5 # poldek-config is an program to provide consistent configurability.
6 # It accesses the main configuration file /etc/poldek/poldek.conf(5)
7 # in a manner that is easy to use by scripted applications.
9 # Author: Elan Ruusamäe <glen@pld-linux.org>
14 Usage: $0 [options] command
18 ignore [PACKAGE] [PACKAGE...]
19 Ignore package list - packages fits given mask will be invisible.
21 hold [PACKAGE] [PACKAGE...]
22 Prevent package listed from being upgraded if they are already installed.
25 Do not remove downloaded packages after its successful installation.
27 cachedir /var/cache/poldek
28 Cache directory for downloaded files. NOTE that parent directory of cachedir must exist.
34 echo >&2 "$PROGRAM: $*"
39 local option="$1"; shift
40 sed -i -re "/^#?$option\s*=/ s#.*#$option = $*#" "$poldek_conf"
43 # parse command line args
45 t=$(getopt -o hc: --long help -n "$PROGRAM" -- "$@")
46 [ $? != 0 ] && exit $?
64 die "Internal error: [$1] not recognized!"
84 option_set "$command" "$arguments"
87 option_set "keep downloads" "$arguments"
90 option_set "cachedir" "$arguments"
93 die "Unknown command: $command"
99 poldek_conf=/etc/poldek/poldek.conf