diff options
Diffstat (limited to 'apkcontent2sqlite.sh')
-rwxr-xr-x | apkcontent2sqlite.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apkcontent2sqlite.sh b/apkcontent2sqlite.sh index e8d1f96..4efdb80 100755 --- a/apkcontent2sqlite.sh +++ b/apkcontent2sqlite.sh @@ -1,11 +1,13 @@ #!/bin/sh -packages="repository" -filelist="filelist" +path=$(readlink -f $0) +path=$(dirname $path) +packages="$path/repository" +filelist="$path/filelist" repos="main testing" archs="x86 x86_64 armhf" -db="db/filelist.db" -csv="csv/filelist.csv" +db="$path/db/filelist.db" +csv="$path/csv/filelist.csv" turbo_db="/var/www/aports-turbo/db/filelist.db" rsync="rsync://nl.alpinelinux.org/alpine/edge" @@ -32,7 +34,9 @@ update_filelist() { local file="${apk##*/}" if [ ! -e "$filelist/$repo/$arch/${file}.csv" ]; then create_apk_csv "$apk" "$repo" "$arch" >> \ - "$filelist/$repo/$arch/${file}.csv" + "$filelist/$repo/$arch/${file}.csv.tmp" + mv "$filelist/$repo/$arch/${file}.csv.tmp" \ + "$filelist/$repo/$arch/${file}.csv" result=1 fi done @@ -94,7 +98,7 @@ mv_db() { } update_apkindex() { - ./apkindex2sqlite.sh + $path/apkindex2sqlite.sh } # just do it |