mirror of
https://github.com/riptidewave93/UNVR-NAS.git
synced 2025-03-09 15:40:13 +00:00
feat: initial upload
Initial public release
This commit is contained in:
commit
85a5bd66e0
30 changed files with 943 additions and 0 deletions
28
scripts/01_pre_docker.sh
Executable file
28
scripts/01_pre_docker.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Source our common vars
|
||||
scripts_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
. ${scripts_path}/vars.sh
|
||||
|
||||
debug_msg "Starting 01_pre_docker.sh"
|
||||
|
||||
# Make sure our BuildEnv dir exists
|
||||
if [ -d ${build_path} ]; then
|
||||
error_msg "BuildEnv already exists, this isn't a clean build! Things might fail, but we're going to try!"
|
||||
else
|
||||
mkdir ${build_path}
|
||||
fi
|
||||
|
||||
# Extract the goodies
|
||||
${scripts_path}/ubnt-fw-parse.py "${root_path}/unifi-firmware/${firmware_filename}" "${build_path}/fw-extract"
|
||||
|
||||
# Extract the squashfs rootfs
|
||||
echo "Extracting unifi rootfs as root..."
|
||||
sudo unsquashfs -f -d "${build_path}/fw-extract/rootfs" "${build_path}/fw-extract/rootfs.bin"
|
||||
|
||||
# Always build to pickup changes/updates/improvements
|
||||
debug_msg "Building ${docker_tag}"
|
||||
docker build -t ${docker_tag} ${root_path}
|
||||
|
||||
debug_msg "Finished 01_pre_docker.sh"
|
Loading…
Add table
Add a link
Reference in a new issue