summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndřej Lysoněk <olysonek@redhat.com>2020-06-09 15:12:39 +0200
committerJean Delvare <jdelvare@suse.de>2020-06-09 15:12:39 +0200
commit3e1648a7f6d88a725a262f7334f14663aff478a4 (patch)
tree3ab0a7f647bc5feeebb1075e4f8277285598c71a
parent97e59ae6ffeef1a6d54eeab11f0fbdea59cb6425 (diff)
downloadquilt-3e1648a7f6d88a725a262f7334f14663aff478a4.tar.gz
quilt.el: Load /etc/quilt.quiltrc if ~/.quiltrc doesn't exist
quilt loads /etc/quilt.quiltrc if ~/.quiltrc doesn't exist. Do the same in quilt.el. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r--lib/quilt.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/quilt.el b/lib/quilt.el
index 5e36746..ca55980 100644
--- a/lib/quilt.el
+++ b/lib/quilt.el
@@ -33,7 +33,11 @@
"Return the value of a configuration variable. Return nil if it is unset."
(or (with-current-buffer (generate-new-buffer " *cmd")
(shell-command
- (concat "test -f ~/.quiltrc && . ~/.quiltrc ;"
+ (concat "if [ -f ~/.quiltrc ]; then"
+ " . ~/.quiltrc ;"
+ "elif [ -f /etc/quilt.quiltrc ]; then"
+ " . /etc/quilt.quiltrc ;"
+ "fi ;"
"echo -n $" var)
t)
(unwind-protect