1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
From 658412ac9603bfbf1a49c7c6e5cf23becb79dc38 Mon Sep 17 00:00:00 2001
From: Alad Wenter <alad@mailbox.org>
Date: Fri, 9 Feb 2018 02:26:20 +0100
Subject: [PATCH] aarchup.c: switch to "auracle sync"
More efficient replacement of cower by the same author.
---
aarchup.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/aarchup.c b/aarchup.c
index e3840eb..bbce913 100644
--- a/aarchup.c
+++ b/aarchup.c
@@ -31,15 +31,13 @@
#define VERSION_NUMBER "1.8.1"
-/* Parse cower -u output.
- * Format: ":: package_name version -> new_version" */
+/* Parse auracle sync output.
+ * Format: "package_name version -> new_version" */
void parse(char *line){
int i, j;
int llen = strlen(line);
- /* Find first space */
- for(i=0;!isspace(line[i]) && i < llen; ++i);
/* Copy package_name */
- for(j=0, ++i;!isspace(line[i]) && i < llen;++j, ++i)
+ for(j=0, i=0;!isspace(line[i]) && i < llen;++j, ++i)
line[j] = line[i];
i = llen - 1;
line[j++] = ' ';
@@ -236,7 +234,7 @@ int print_help(char *name)
printf(" For more information on it check man.\n");
printf(" --help Prints this help.\n");
printf(" --version Shows the version.\n");
- printf(" --aur Check aur for new packages too. Will need cower installed.\n");
+ printf(" --aur Check aur for new packages too. Will need auracle installed.\n");
printf(" --debug|-d Print debug info.\n");
printf(" --ftimeout|-f [value] Program will manually enforce timeout for closing notification.\n");
printf(" Do NOT use with --timeout, if --timeout works or without --loop-time [value].\n");
@@ -503,7 +501,7 @@ int main(int argc, char **argv)
/* Those are needed by libnotify. */
char *name = "New Updates";
char *category = "update";
- char *cower = "cower -u";
+ char *auracle = "auracle sync";
NotifyNotification *my_notify = NULL;
/* Those are needed for the output. */
@@ -574,10 +572,10 @@ int main(int argc, char **argv)
if(aur && i < max_number_out){
if(debug)
printf("DEBUG(info): aur is on, checking for updates in aur\n");
- /* call cower */
+ /* call auracle */
if(debug)
- printf("DEBUG(info): running command: %s\n", cower);
- pac_out = popen(cower, "r");
+ printf("DEBUG(info): running command: %s\n", auracle);
+ pac_out = popen(auracle, "r");
if(ignore_pkg_flag)
IgnorePkg = get_ignore_pkgs(&ign_pkg_size,debug);
--
2.16.1
|