#!/usr/bin/env bash
# Created by Tobias Powalowski <tpowa@archlinux.org>

build ()
{
    add_file "/usr/bin/archboot-setup.sh" "/usr/bin/setup"
    add_file "/usr/bin/archboot-quickinst.sh" "/usr/bin/quickinst"
    add_file "/usr/bin/genfstab"
    add_file "/usr/bin/arch-chroot"
    add_file "/usr/bin/pacstrap"
    add_file "/usr/bin/archboot-update-installer.sh" "/usr/bin/update-installer.sh"
    add_file "/usr/bin/archboot-create-container.sh"
    add_file "/usr/bin/archboot-x86_64-release.sh"
    add_file "/usr/bin/archboot-mktorrent.sh"
    add_file "/usr/bin/archboot-restore-usbstick.sh"
    add_binary "/usr/bin/isoinfo" 
    add_binary "/usr/bin/mktorrent"
    # only include cachedir on booted archboot or container
    if [[ -e "/etc/hostname" ]]; then
        [[ "$(cat /etc/hostname)" == "archboot" ]] && add_full_dir "/var/cache/pacman/pkg"
    else
        add_full_dir "/var/cache/pacman/pkg"
    fi
}

help ()
{
cat<<HELPEOF
  This hook includes the archboot installer and arch-install-scripts 
  on an archboot image.
HELPEOF
}
