# these are the steps which can be used to bring an older image to or near
# the latest state - this might work more or less depending on the changes
# inbetween
#
# first get the imagebuilder repo via git
git clone https://github.com/hexdump0815/imagebuilder.git

# or download
wget https://github.com/hexdump0815/imagebuilder/archive/refs/heads/main.zip
unzip main.zip
mv imagebuilder-main imagebuilder
rm -f main.zip

# install updated files - example aarch64 amlogic_gx bullseye
# use the h option of tar to avoid accidently overwriting symbolic links and
# exclude etc to avoid breaking changes to the configuration - the excludes
# can be omitted if this update procedure is done before any configurations
# of the system are done
cd imagebuilder
cd files/extra-files
tar --exclude='etc/hosts' --exclude='etc/hostname' -cf - * | ( cd / ; tar xhf - )
cd ../extra-files-bullseye && tar -cf - * | ( cd / ; tar xhf - )
cd ../extra-files-aarch64 && tar -cf - * | ( cd / ; tar xhf - )
cd ../extra-files-aarch64-bullseye && tar -cf - * | ( cd / ; tar xhf - )
cd ../../systems/amlogic_gx/extra-files && tar --exclude='boot' -cf - * | ( cd / ; tar xhf - )

# now it is time to have a look at the postinstall, rc-local-additions and
# extra-files/boot/* files in systems/amlogic_gx and do/add newer things
# from there ...
