summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-02-27 13:51:51 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2015-02-27 13:51:51 +0000
commit42c94d54c704ce9638ff8f4dab8ac4ea0298b451 (patch)
treedc14ca458937262d6632b612710a1a2c5a43bb7f
parent31ebd35122157f33e4889fb9fb0395fb680e670b (diff)
downloadrepo-scripts-42c94d54c704ce9638ff8f4dab8ac4ea0298b451.tar.bz2
repo-scripts-42c94d54c704ce9638ff8f4dab8ac4ea0298b451.tar.xz
cleanup of apk contents script
-rwxr-xr-xapk-content2sqlite.sh7
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
}