1diff --git a/pkgkit b/pkgkit
2index 9fd7a69e427016a722ece5d9b1eb6b1702a8cd39..735d1771910ccbd73fefe9c132df7bc665b3c8fe 100755
3--- a/pkgkit
4+++ b/pkgkit
5@@ -253,20 +253,24 @@
6 . /etc/os-release
7 aver="$(get_aver)"
8
9+ tmp_repo="/tmp/$aver/"
10 path="$remote_path/$aver/$arch"
11
12 set -x
13- ssh "$remote" \
14- find "$path" -type f -name '*.apk' -print0 |
15- ssh "$remote" xargs -0 apk index \
16- --rewrite-arch "$(uname -m)" \
17- -x "$path"/APKINDEX.tar.gz \
18- -o "$path"/APKINDEX.unsigned.tar.gz
19+ # since my remote server is not alpine I have to download the repo localy
20 rsync --blocking-io -rP \
21- "$remote:$path/APKINDEX.unsigned.tar.gz" \
22- /tmp/APKINDEX.tar.gz
23- abuild-sign /tmp/APKINDEX.tar.gz
24- rsync --blocking-io -rP /tmp/APKINDEX.tar.gz "$remote:$path/"
25+ "$remote:$path/" \
26+ "$tmp_repo"
27+
28+ find "tmp_repo" -type f -name '*.apk' -print0 |
29+ xargs -0 apk index \
30+ --rewrite-arch "$(uname -m)" \
31+ -x "$tmp_repo"/APKINDEX.tar.gz \
32+ -o "$tmp_repo"/APKINDEX.unsigned.tar.gz
33+
34+ abuild-sign "$tmp_repo/APKINDEX.unsigned.tar.gz"
35+ rsync --blocking-io -rP "$tmp_repo/APKINDEX.unsigned.tar.gz" \
36+ "$remote:$path/APKINDEX.tar.gz"
37 set +x
38 )
39