-
Notifications
You must be signed in to change notification settings - Fork 1
/
prepare-packages.sh
44 lines (36 loc) · 1.14 KB
/
prepare-packages.sh
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
36
37
38
39
40
41
42
43
44
#! /bin/sh
#
# copy necessary binary packages into setupliveimage per packages-YYYYMMDD.list
#
PKGSRCDIR=/usr/pkgsrc
RELEASE=10.1
PKGSRC_VER=${RELEASE}_2024Q4
#PACKAGESDIR_I386=${PKGSRCDIR}/packages/i386/${PKGSRC_VER}/All
#PACKAGESDIR_X86_64=${PKGSRCDIR}/packages/x86_64/${PKGSRC_VER}/All
PACKAGESDIR_I386=${PKGSRCDIR}/packages/i386-${PKGSRC_VER}/All
PACKAGESDIR_X86_64=${PKGSRCDIR}/packages/x86_64-${PKGSRC_VER}/All
if [ -f REVISION ]; then
. ./REVISION
fi
if [ "${REVISION}"X = "X" ]; then
REVISION=`date +%C%y%m%d`
fi
if [ ! -f list/packages-${REVISION}.list ]; then
echo Error: no packages-${REVISION}.list file.
exit 1
fi
PACKAGES=`cat list/packages-${REVISION}.list`
IMAGE_PACKAGESDIR=liveimagefiles/packages
echo Removing old binaries...
rm -f ${IMAGE_PACKAGESDIR}/i386/*.tgz ${IMAGE_PACKAGESDIR}/x86_64/*.tgz
for pkg in ${PACKAGES}; do
echo Copying ${pkg}.tgz
if [ ! -f ${PACKAGESDIR_I386}/${pkg}.tgz ] || \
[ ! -f ${PACKAGESDIR_X86_64}/${pkg}.tgz ]; then
echo Error: ${pkg} is not found.
exit 1
fi
cp ${PACKAGESDIR_I386}/${pkg}.tgz ${IMAGE_PACKAGESDIR}/i386
cp ${PACKAGESDIR_X86_64}/${pkg}.tgz ${IMAGE_PACKAGESDIR}/x86_64
done
echo Done!