#!/bin/bash set -euo pipefail baseDir="$(realpath "$(dirname "${0}")")" printf \ '\033[?47l\012' cat << EOF ####################################### ## ## ## $(cat "${baseDir}/title") Script ## ## ## ## Jean ## ## ## ####################################### #################### ## ## ## Pre ## ## Installation ## ## ## #################### EOF source \ /etc/os-release source \ "${baseDir}/system.conf" if [[ -f '/usr/bin/gsettings' ]]; then gsettings \ set \ org.gnome.desktop.media-handling \ automount \ false fi if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then "${baseDir}/debian.sh" --live elif [[ "${ID}" == 'fedora' ]]; then "${baseDir}/fedora.sh" --live fi timedatectl if [[ ! "$(hostname)" == "debian-live" ]]; then "${baseDir}/zfs.sh" --host-id fi "${baseDir}/partition.sh" sleep 5 "${baseDir}/zfs.sh" "${baseDir}/mkdir-tmpfs.sh" if [[ "${ID}" == 'elementary' ]]; then "${baseDir}/elementary.sh" --mmdebstrap elif [[ "${ID}" == 'debian' ]]; then "${baseDir}/debian.sh" --mmdebstrap elif [[ "${ID}" == 'fedora' ]]; then "${baseDir}/fedora.sh" --rsync fi "${baseDir}/hostname.sh" if [[ "${ID}" == 'debian' ]]; then "${baseDir}/debian.sh" --network-interfaces fi if [[ "${ID}" == 'elementary' ]]; then "${baseDir}/elementary.sh" --sources elif [[ "${ID}" == 'debian' ]]; then "${baseDir}/debian.sh" --sources fi "${baseDir}/rbind.sh" "${baseDir}/host-id.sh" if [[ "${ID}" == 'fedora' ]]; then "${baseDir}/fedora.sh" --resolv-conf fi "${baseDir}/rsync.sh" if [[ "${ID}" == 'elementary' ]]; then "${baseDir}/elementary.sh" --skel fi # if [[ ! "${*}" = *--no-part* ]]; then if [[ -f "/etc/zfs/keys/${hostname,,}.key" ]]; then "${baseDir}/zfs.sh" --key fi # fi if [[ "${ID}" == 'elementary' ]]; then "${baseDir}/elementary.sh" --elementary fi "${baseDir}/chroot.sh" --continue "${baseDir}/zfs.sh" --unmount printf \ '\033[?47h\033[2J\033[H' cat <