UNVR-NAS/scripts/04_post_docker.sh
Chris Blake 3f90bd2357
feat: Add UNVR support (#11)
* Move partition mounts to PARTLABEL instead of paths
* Add dual firmware building support, specify the build type using the BOARD env var when using make
* Update to Unifi 4.0.5 pre-release firmware
* Move ulcmd init to be our "user interface" setup script, will handle LEDs on the UNVR4 in the future
* Update README with updated instructions
* Add udev rules to support /dev/boot which is what Unifi uses for some stupid reason for their emmc. This is required for systemd to mount correctly after chroot.
* Fixup small bugs found along the way
2024-06-15 18:53:44 -05:00

25 lines
830 B
Bash
Executable file

#!/bin/bash
set -e
# Source our common vars
scripts_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
. ${scripts_path}/vars.sh
debug_msg "Starting 04_post_docker.sh"
if [ -d ${build_path}/final ]; then
debug_msg "WARNING: final builddir already exists! Cleaning up..."
rm -rf ${build_path}/final
fi
mkdir -p ${build_path}/final
# Kick off the docker to do the magics for us, since we need genimage
docker run --rm -v "${root_path}:/repo:Z" -e BOARD="${BOARD}" -it ${docker_tag} /repo/scripts/docker/run_mkimage_final.sh
# Just create our final dir and move bits over
TIMESTAMP=`date +%Y%m%d-%H%M`
mkdir -p ${root_path}/output/${TIMESTAMP}
mv ${build_path}/final/debian*.img.gz ${root_path}/output/${TIMESTAMP}/
sudo rm -rf ${build_path} # Be gone, we done buildin! :)
debug_msg "Finished 04_post_docker.sh"