Cleanup var declarations
This commit is contained in:
@@ -401,16 +401,6 @@ make_images() {
|
|||||||
> "$BUILDDIR/make.log"
|
> "$BUILDDIR/make.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
verify_images() {
|
|
||||||
debug "${FUNCNAME[0]}" "$*"
|
|
||||||
local sha256_file="$1"
|
|
||||||
local outfile
|
|
||||||
|
|
||||||
for outfile in "$BINDIR"/*.img.gz; do
|
|
||||||
verify "$outfile" "$sha256_file" || return 1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
flash_images() {
|
flash_images() {
|
||||||
debug "${FUNCNAME[0]}"
|
debug "${FUNCNAME[0]}"
|
||||||
local img_gz="$1"
|
local img_gz="$1"
|
||||||
@@ -732,13 +722,13 @@ main() {
|
|||||||
declare -g BINDIR="$BUILDROOT/bin/$profile/$RELEASE"
|
declare -g BINDIR="$BUILDROOT/bin/$profile/$RELEASE"
|
||||||
|
|
||||||
if [[ "$RELEASE" == "snapshot" ]]; then
|
if [[ "$RELEASE" == "snapshot" ]]; then
|
||||||
declare url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET"
|
local url_prefix="https://downloads.openwrt.org/snapshots/targets/$TARGET"
|
||||||
declare url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.zst"
|
local url_filename="openwrt-imagebuilder-${TARGET//\//-}.Linux-x86_64.tar.zst"
|
||||||
declare img_fname="openwrt-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
|
local img_fname="openwrt-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
|
||||||
else
|
else
|
||||||
declare url_prefix="https://downloads.openwrt.org/releases/$RELEASE/targets/$TARGET"
|
local url_prefix="https://downloads.openwrt.org/releases/$RELEASE/targets/$TARGET"
|
||||||
declare url_filename="openwrt-imagebuilder-$RELEASE-${TARGET//\//-}.Linux-x86_64.tar.xz"
|
local url_filename="openwrt-imagebuilder-$RELEASE-${TARGET//\//-}.Linux-x86_64.tar.xz"
|
||||||
declare img_fname="openwrt-$RELEASE-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
|
local img_fname="openwrt-$RELEASE-${TARGET//\//-}-$DEVICE-$FILESYSTEM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local ib_url="$url_prefix/$url_filename"
|
local ib_url="$url_prefix/$url_filename"
|
||||||
@@ -766,7 +756,7 @@ main() {
|
|||||||
if ((DEBUG)); then
|
if ((DEBUG)); then
|
||||||
echo "Profile settings:"
|
echo "Profile settings:"
|
||||||
for x in "${!P_ARR[@]}"; do printf "%s=%s\n" "$x" "${P_ARR[$x]}"; done
|
for x in "${!P_ARR[@]}"; do printf "%s=%s\n" "$x" "${P_ARR[$x]}"; done
|
||||||
echo "Environement variables:"
|
echo "Environment variables:"
|
||||||
declare -p
|
declare -p
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -778,8 +768,11 @@ main() {
|
|||||||
verify "$ib_file" "$ib_sha256_file" &&
|
verify "$ib_file" "$ib_sha256_file" &&
|
||||||
extract "$ib_file" "$BUILDDIR" || return $?
|
extract "$ib_file" "$BUILDDIR" || return $?
|
||||||
add_repos
|
add_repos
|
||||||
make_images &&
|
make_images
|
||||||
verify_images "$ib_sha256_file"
|
# Verify output iamges
|
||||||
|
for outfile in "$BINDIR"/*.img.gz; do
|
||||||
|
verify "$outfile" "$ib_sha256_file" || return 1
|
||||||
|
done
|
||||||
#copyFiles
|
#copyFiles
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user