add builderVersion parameter
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
version,
|
||||
packages ? [],
|
||||
manifestPkgs ? "$(cat manifest_packages)",
|
||||
workingFolder ? "$PWD/_builder"
|
||||
workingFolder ? "$PWD/_builder",
|
||||
builderVersion ? version
|
||||
}:
|
||||
pkgs.mkShell {
|
||||
name = "openwrt-build-${target}-${arch}-${profile}";
|
||||
@@ -41,17 +42,18 @@ pkgs.mkShell {
|
||||
shellHook =
|
||||
''
|
||||
export WORKING_FOLDER=$(realpath ${workingFolder})
|
||||
mkdir -p $WORKING_FOLDER
|
||||
function loadBuilder() {
|
||||
curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64.tar.xz | tar xvJ -C $WORKING_FOLDER
|
||||
curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-${version}-${target}-${arch}.manifest | cut -f 1 -d ' ' | tr '\n' ' ' > $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64/manifest_packages
|
||||
curl -s https://downloads.openwrt.org/releases/${builderVersion}/targets/${target}/${arch}/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64.tar.xz | tar xvJ -C $WORKING_FOLDER
|
||||
curl -s https://downloads.openwrt.org/releases/${version}/targets/${target}/${arch}/openwrt-${version}-${target}-${arch}.manifest | cut -f 1 -d ' ' | tr '\n' ' ' > $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64/manifest_packages
|
||||
}
|
||||
|
||||
function removeBuilder() {
|
||||
rm -rf $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64
|
||||
rm -rf $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64
|
||||
}
|
||||
|
||||
function makeImage() {
|
||||
cd $WORKING_FOLDER/openwrt-imagebuilder-${version}-${target}-${arch}.Linux-x86_64
|
||||
cd $WORKING_FOLDER/openwrt-imagebuilder-${builderVersion}-${target}-${arch}.Linux-x86_64
|
||||
MANIFEST_PKGS=${manifestPkgs}
|
||||
make image PROFILE=${profile} PACKAGES="$MANIFEST_PKGS ${toString packages}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user