diff options
Diffstat (limited to 'copy_host_packages_to_mirror.sh')
-rwxr-xr-x | copy_host_packages_to_mirror.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/copy_host_packages_to_mirror.sh b/copy_host_packages_to_mirror.sh new file mode 100755 index 0000000..aff7535 --- /dev/null +++ b/copy_host_packages_to_mirror.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +rm -rf {core,extra,community}/os/x86_64/ +mkdir -p {core,extra,community}/os/x86_64/ + +for p in `cat archiso/arch/pkglist.x86_64.txt`; do + pkgname=`echo $p | cut -f 2 -d " "` + if test -f "/var/cache/pacman/pkg/$pkgname"*"x86_64.pkg.tar.xz"; then + cp -v "/var/cache/pacman/pkg/$pkgname"*"x86_64.pkg.tar.xz" core/os/x86_64/. + fi + if test -f "/var/cache/pacman/pkg/$pkgname"*"any.pkg.tar.xz"; then + cp -v "/var/cache/pacman/pkg/$pkgname"*"any.pkg.tar.xz" core/os/x86_64/. + fi +done + +repo-add -n core/os/x86_64/core.db.tar.gz core/os/x86_64/* +ln -fs core.db.tar.gz core/os/x86_64/core.db +tar zcvfT extra/os/x86_64/extra.db.tar.gz /dev/null +ln -fs extra.db.tar.gz extra/os/x86_64/extra.db +tar zcvfT community/os/x86_64/community.db.tar.gz /dev/null +ln -fs community.db.tar.gz community/os/x86_64/community.db |