#!/bin/bash # # Plugbox Linux Distribution Image Builder # Version 0.0.1 # # Licensed under the GPLv2. # # Usage: ./distro-builder working/directory/ # # ==== Variables to set ==== INSTALLEDPKGS="base libidn libsigsegv openssh openssl" RELEASEVER=1.1 # ==== The Process ==== mkdir -p $1 echo "Installing packages..." mkdir -p $1/var/lib/pacman pacman -Syy -r $1 $INSTALLEDPKGS echo "Setting the password to 'root' and cleaning up" echo -e "root\nroot\n" | chroot $1/ /usr/bin/passwd root chroot $1/ /usr/bin/pacman -Scc echo "Creating a rootfs.tar.gz..." cd $1 echo $RELEASEVER > /etc/plugbox-version tar czf ../Plugbox-Linux-$RELEASEVER.tar.gz ./* cd ../ echo "All done!"