aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2022-05-09 13:56:09 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2022-05-09 13:56:09 +0200
commitad56a6a03a98e42f4e30a98bb22252875d8f0254 (patch)
treed53292b8153d6cdf6fa3f053c5e8d75d55a78a2f
parent0a54d478cfaa1a9cefddaf2196f0cc91a46f7bd9 (diff)
fdroid.el: Allows performing operations without a device connection
-rw-r--r--fdroid.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/fdroid.el b/fdroid.el
index 3fd25d0..84fec38 100644
--- a/fdroid.el
+++ b/fdroid.el
@@ -19,10 +19,12 @@
:group 'fdroid
:type 'boolean)
+(defcustom fdroid-sans-device nil
+ "If non-nil, it indicates `fdroid' commands should override the device connection check.")
+
(defvar fdroid--packages nil
"Holds the list of cached packages from the current F-Droid repository.")
-
(defvar fdroid-map nil
"Map to bind `fdroid' commands to.")
@@ -33,7 +35,8 @@ and shows MESSAGE after completion."
(erase-buffer)
(call-process fdroid-program nil t nil "devices")
(goto-char (point-min))
- (if (re-search-forward (rx (: bol (+ alphanumeric) " - " (+ any))) (point-at-eol) t)
+ (if (or (re-search-forward (rx (: bol (+ alphanumeric) " - " (+ any))) (point-at-eol) t)
+ fdroid-sans-device)
(let ((process (make-process
:name "fdroid.el"
:buffer (current-buffer)