[packages/poldek] poldek-config: add keep_downloads option
glen
glen at pld-linux.org
Wed Nov 18 10:42:17 CET 2015
commit 5eb4cc67e7b99237a6e70ff6de4a50a12b7fd7f8
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Nov 18 11:41:58 2015 +0200
poldek-config: add keep_downloads option
poldek-config.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/poldek-config.sh b/poldek-config.sh
index 9e67ed2..01503d0 100755
--- a/poldek-config.sh
+++ b/poldek-config.sh
@@ -21,6 +21,9 @@ ignore [PACKAGE] [PACKAGE...]
hold [PACKAGE] [PACKAGE...]
Prevent package listed from being upgraded if they are already installed.
+keep_downloads yes|no
+ Do not remove downloaded packages after its successful installation.
+
EOF
}
@@ -31,7 +34,7 @@ die() {
option_set() {
local option="$1"; shift
- sed -i -e "/^$option/ s/.*/$option = $*/" "$poldek_conf"
+ sed -i -re "/^#?$option\s*=/ s/.*/$option = $*/" "$poldek_conf"
}
# parse command line args
@@ -73,6 +76,9 @@ main() {
ignore|hold)
option_set "$command" "$arguments"
;;
+ keep_downloads)
+ option_set "keep downloads" "$arguments"
+ ;;
*)
die "Unknown command: $command"
;;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/5eb4cc67e7b99237a6e70ff6de4a50a12b7fd7f8
More information about the pld-cvs-commit
mailing list