diff options
-rwxr-xr-x | apk-content2sqlite.sh | 7 |
1 files 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 } |