PKGBUILDs/scripts/distro-builder
2007-05-19 01:01:01 -07:00

26 lines
673 B
Bash
Executable file

#!/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!"