@mhka I always wanted live-systems to rely on this kind of mechanism…
This way, you:
Boot on the live-cd / live-usb-stick;
Use the product, be happy, decide to keep it;
Run the installation process (which does what you show);
Remove the device you booted from to free the CD-ROM drive / USB port;
All work you did in the live system is *not* lost;
All customization you did in the live system is *not* lost;
No need to reboot.