From 42c94d54c704ce9638ff8f4dab8ac4ea0298b451 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Fri, 27 Feb 2015 13:51:51 +0000 Subject: cleanup of apk contents script --- apk-content2sqlite.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apk-content2sqlite.sh b/apk-content2sqlite.sh index d09f7fd..617cd16 100755 --- a/apk-content2sqlite.sh +++ b/apk-content2sqlite.sh @@ -13,11 +13,10 @@ create_filelist() { local filelist=$(tar --exclude ".*" -ztf "$apk") local filename="${apk##*/}" local pkgname="${filename%-*-*}" - oIFS=$IFS IFS=$'\n' for item in $filelist; do - file="${item##*/}" - path="${item%/*}" + file="${item##*/}" + path="${item%/*}" case "$file" in *,*) file="\"$file\"" ;; esac @@ -27,7 +26,7 @@ create_filelist() { [ ! -z "$file" ] && \ echo "$file,$path,$pkgname,$repo,$arch" >> $output done - IFS=$oIFS + unset IFS } -- cgit v1.2.3