install.sh 1.88 KB
Newer Older
Daniel Bissani Furlin's avatar
Daniel Bissani Furlin committed
1
#!/usr/bin/env bash
2
# shellcheck disable=SC1090
3 4 5 6 7 8
#
# Copyright (C) 2017 Centro de Computacao Cientifica e Software Livre
# Departamento de Informatica - Universidade Federal do Parana - C3SL/UFPR
#
# This file is part of create-iso
#
9
# create-iso is free software; you can redistribute it and/or
10 11 12 13 14 15 16 17 18 19 20 21 22
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA.
23

sulzbach's avatar
sulzbach committed
24 25 26
# PROFILE="$1"
# NAME="$2"
# WEBSITE="$3"
sulzbach's avatar
sulzbach committed
27 28 29 30 31 32 33 34
# TMP="$4"
CHROOTDIR="$5"
# CACHEDIR="$6"
PKGLIST="$7"
# SOURCESLIST="$8"
REPO="$9"
# KEYURL="${10}"
# DBG="${11}"
sulzbach's avatar
sulzbach committed
35

sulzbach's avatar
sulzbach committed
36
source "${PREFIX}/include/chroot.sh"
Daniel Bissani Furlin's avatar
Daniel Bissani Furlin committed
37

sulzbach's avatar
sulzbach committed
38 39 40
add_to_chroot_file "${CHROOTDIR}" \
"export PATH='/fakebin:${PATH}' || \
create_iso_logger --message \"Unable to export PATH\" --script \
sulzbach's avatar
sulzbach committed
41
\"$(basename "${BASH_SOURCE[0]}")\" --line \"${LINENO}\" --tag \"export\""
sulzbach's avatar
sulzbach committed
42 43 44
add_to_chroot_file "${CHROOTDIR}" \
"export DEBIAN_FRONTEND=noninteractive || \
create_iso_logger --message \"Unable to export DEBIAN_FRONTEND\" --script \
sulzbach's avatar
sulzbach committed
45
\"$(basename "${BASH_SOURCE[0]}")\" --line \"${LINENO}\" --tag \"export\""
sulzbach's avatar
sulzbach committed
46 47 48 49 50 51
add_to_chroot_file "${CHROOTDIR}" \
"apt-get update && apt-get --quiet --yes --target-release ${REPO} install \
$(grep --invert-match '^#' < \
"${PKGLIST}/install.list" | \
tr '\n' ' ') || \
create_iso_logger --message \"Unable to install listed packages\" --script \
sulzbach's avatar
sulzbach committed
52
\"$(basename "${BASH_SOURCE[0]}")\" --line \"${LINENO}\" --tag \"apt-get\""
53 54

exit 0