[packages/poldek] poldek-config: option to change cache dir
glen
glen at pld-linux.org
Tue Jan 5 13:36:19 CET 2016
commit 6e7e163ccd7bbc717d0d2bf6919edd7cd0de4b50
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Jan 5 14:35:56 2016 +0200
poldek-config: option to change cache dir
poldek-config.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/poldek-config.sh b/poldek-config.sh
index 01503d0..d8732ef 100755
--- a/poldek-config.sh
+++ b/poldek-config.sh
@@ -24,6 +24,9 @@ hold [PACKAGE] [PACKAGE...]
keep_downloads yes|no
Do not remove downloaded packages after its successful installation.
+cachedir /var/cache/poldek
+ Cache directory for downloaded files. NOTE that parent directory of cachedir must exist.
+
EOF
}
@@ -34,7 +37,7 @@ die() {
option_set() {
local option="$1"; shift
- sed -i -re "/^#?$option\s*=/ s/.*/$option = $*/" "$poldek_conf"
+ sed -i -re "/^#?$option\s*=/ s#.*#$option = $*#" "$poldek_conf"
}
# parse command line args
@@ -79,6 +82,9 @@ main() {
keep_downloads)
option_set "keep downloads" "$arguments"
;;
+ cachedir|cache_dir)
+ option_set "cachedir" "$arguments"
+ ;;
*)
die "Unknown command: $command"
;;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/6e7e163ccd7bbc717d0d2bf6919edd7cd0de4b50
More information about the pld-cvs-commit
mailing list