[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH v2 4/7] quilt.el: Load /etc/quilt.quiltrc if ~/.quilt
From: |
Ondřej Lysoněk |
Subject: |
[Quilt-dev] [PATCH v2 4/7] quilt.el: Load /etc/quilt.quiltrc if ~/.quiltrc doesn't exist |
Date: |
Sat, 30 May 2020 18:17:21 +0200 |
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>
---
lib/quilt.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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
--
2.25.4
- [Quilt-dev] [PATCH v2 1/7] quilt.el: Fix documentation of quilt-pc-directory, Ondřej Lysoněk, 2020/05/30
- [Quilt-dev] [PATCH v2 2/7] quilt.el: Refactor config reading functions, Ondřej Lysoněk, 2020/05/30
- [Quilt-dev] [PATCH v2 3/7] Document that quilt loads /etc/quilt.quiltrc, Ondřej Lysoněk, 2020/05/30
- [Quilt-dev] [PATCH v2 4/7] quilt.el: Load /etc/quilt.quiltrc if ~/.quiltrc doesn't exist,
Ondřej Lysoněk <=
- [Quilt-dev] [PATCH v2 5/7] quilt.el: Make quilt-patches-directory return per-project setting, Ondřej Lysoněk, 2020/05/30
- [Quilt-dev] [PATCH v2 6/7] quilt.el: Fix quilt-editable when QUILT_PATCHES_PREFIX is set, Ondřej Lysoněk, 2020/05/30
- [Quilt-dev] [PATCH v2 7/7] quilt.el: Fix a typo in documentation, Ondřej Lysoněk, 2020/05/30