summaryrefslogtreecommitdiff
path: root/copy_local_packages.sh
blob: 6764c1c889b09000658e13768e938ee47e04ac6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

rm -rf core/os/x86_64/
mkdir -p core/os/x86_64/

for p in `cat archiso/arch/pkglist.x86_64.txt`; do
	case $p in
		core/*)
			pkgname=`echo $p | cut -f 2 -d /`
			if test -f /var/cache/pacman/pkg/$pkgname*x86_64.pkg.tar.xz; then
				cp /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 /var/cache/pacman/pkg/$pkgname*any.pkg.tar.xz core/os/x86_64/.
			fi
			;;
	esac
done

ADDITIONAL_PKGS="libunistring-0.9.3-6"
for pkgname in $ADDITIONAL_PKGS; do
	if test -f /var/cache/pacman/pkg/$pkgname*x86_64.pkg.tar.xz; then
		cp /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 /var/cache/pacman/pkg/$pkgname*any.pkg.tar.xz core/os/x86_64/.
	fi
done

repo-add core/os/x86_64/core.db.tar.gz core/os/x86_64/*
ln -s core.db.tar.gz core/os/x86_64/core.db
tar zcvfT extra/os/x86_64/extra.db.tar.gz /dev/null
ln -s extra.db.tar.gz extra/os/x86_64/extra.db
tar zcvfT community/os/x86_64/community.db.tar.gz /dev/null
ln -s community.db.tar.gz community/os/x86_64/community.db