build/prefetch: make it like clean, add packages option
This commit is contained in:
parent
6f98277ed3
commit
675aec1a0a
13
README.md
13
README.md
|
@ -135,9 +135,16 @@ distribution files before running the actual build:
|
|||
|
||||
# make distfiles
|
||||
|
||||
Compiled base and kernel sets can be prefetched from a mirror:
|
||||
Compiled base and kernel sets can be prefetched from a mirror,
|
||||
while removing any previously available set:
|
||||
|
||||
# make prefetch VERSION=version.to.prefetch
|
||||
# make prefetch-<option>[,...] VERSION=version.to.prefetch
|
||||
|
||||
Available prefetch options are:
|
||||
|
||||
* base: prefetch the base set
|
||||
* kernel: prefetch the kernel set
|
||||
* packages: prefetch the packages set
|
||||
|
||||
Core packages (pristine copies) can be batch-built using:
|
||||
|
||||
|
@ -160,7 +167,7 @@ via the clean script:
|
|||
|
||||
# make clean-<option>[,...]
|
||||
|
||||
Available options are:
|
||||
Available clean options are:
|
||||
|
||||
* base: remove the base set
|
||||
* distfiles: remove the distfiles set
|
||||
|
|
|
@ -31,11 +31,23 @@ set -e
|
|||
|
||||
MIRROR="https://pkg.opnsense.org/sets"
|
||||
|
||||
sh ./clean.sh base kernel
|
||||
|
||||
URL="${MIRROR}/base-${PRODUCT_VERSION}-${ARCH}"
|
||||
fetch -o ${SETSDIR} ${URL}.obsolete
|
||||
fetch -o ${SETSDIR} ${URL}.txz
|
||||
|
||||
URL="${MIRROR}/kernel-${PRODUCT_VERSION}-${ARCH}"
|
||||
fetch -o ${SETSDIR} ${URL}.txz
|
||||
for ARG in ${@}; do
|
||||
case ${ARG} in
|
||||
base)
|
||||
sh ./clean.sh ${ARG}
|
||||
URL="${MIRROR}/${ARG}-${PRODUCT_VERSION}-${ARCH}"
|
||||
fetch -o ${SETSDIR} ${URL}.obsolete
|
||||
fetch -o ${SETSDIR} ${URL}.txz
|
||||
;;
|
||||
kernel)
|
||||
sh ./clean.sh ${ARG}
|
||||
URL="${MIRROR}/${ARG}-${PRODUCT_VERSION}-${ARCH}"
|
||||
fetch -o ${SETSDIR} ${URL}.txz
|
||||
;;
|
||||
packages)
|
||||
sh ./clean.sh ${ARG}
|
||||
URL="${MIRROR}/${ARG}-${PRODUCT_VERSION}-${PRODUCT_FLAVOUR}-${ARCH}"
|
||||
fetch -o ${SETSDIR} ${URL}.tar
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue