summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-06-18 00:51:29 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-18 00:51:29 +0200
commit511fe654e5cb4d0c995c9ecacf0795a4ad68f348 (patch)
treebc672c9ed5eb4cbd5eb436a07f043dfb7ff755f3
parent739e9c3926abf269c65c1f9bf50fbe732b3f55d8 (diff)
downloadaports-cache-511fe654e5cb4d0c995c9ecacf0795a4ad68f348.tar.bz2
aports-cache-511fe654e5cb4d0c995c9ecacf0795a4ad68f348.tar.xz
define echo separator
-rw-r--r--aports-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/aports-cache.c b/aports-cache.c
index 8abfc96..f185e7f 100644
--- a/aports-cache.c
+++ b/aports-cache.c
@@ -64,6 +64,7 @@ err1:
static int read_apkbuild(int shellfd, size_t size, const char *name)
{
+#define ECHO_SEPARATOR "echo \"-\"\n"
#define ECHO_STR(var) "[ -n \"$" #var "\" ] && echo \" " #var ": $" #var "\"\n"
#define ECHO_LIST(var) "[ -n \"$" #var "\" ] && echo ' " #var ":' && " \
"for i in $" #var "; do\n" \
@@ -94,7 +95,7 @@ static int read_apkbuild(int shellfd, size_t size, const char *name)
" exit 1\n"
"fi\n"
- "echo \"-\"\n"
+ ECHO_SEPARATOR
ECHO_STR(pkgname)
ECHO_STR(pkgver)
ECHO_LIST(arch)