From f9d620301de446088e2f8efcdfae8b90e8c592a3 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Tue, 15 Jan 2008 11:50:46 +0100 Subject: [PATCH] Fix repo-add.sh See FS#9171. Signed-off-by: Nagy Gabor --- scripts/repo-add.sh.in | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index c37a12f..672154c 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -93,8 +93,7 @@ test_repo_db_file () { write_list_entry() { if [ -n "$2" ]; then echo "%$1%" >>$3 - echo $2 | tr -s ' ' '\n' >>$3 - echo "" >>$3 + echo -e $2 >>$3 fi } @@ -151,13 +150,13 @@ db_write_entry() grep -v "^#" | sed 's|\(\w*\)\s*=\s*\(.*\)|\1="\2"|'); do eval "$line" case "$line" in - group=*) _groups="$_groups $group" ;; - depend=*) _depends="$_depends $depend" ;; - backup=*) _backups="$_backups $backup" ;; - license=*) _licenses="$_licenses $license" ;; - replaces=*) _replaces="$_replaces $replaces" ;; - provides=*) _provides="$_provides $provides" ;; - conflict=*) _conflicts="$_conflicts $conflict" ;; + group=*) _groups="$_groups$group\n" ;; + depend=*) _depends="$_depends$depend\n" ;; + backup=*) _backups="$_backups$backup\n" ;; + license=*) _licenses="$_licenses$license\n" ;; + replaces=*) _replaces="$_replaces$replaces\n" ;; + provides=*) _provides="$_provides$provides\n" ;; + conflict=*) _conflicts="$_conflicts$conflict\n" ;; esac done -- 1.5.3.7