2 # This file is part of Ian Kelling's automated-distro-installer
3 # Copyright (C) 2024 Ian Kelling
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 set -e; .
/usr
/local
/lib
/bash-bear
; set +e
21 this_file
="$(readlink -f -- "${BASH_SOURCE[0]}")"
22 readonly this_file this_dir
="${this_file%/*}"
27 Usage: mymk-basefile [-h|--help] [mk-basefile_args]
28 Wrap fai's mk-basefile so output dir is $BASEFILE_DIR if it exists.
30 And fix things for trisquel. mk-basefile has a trisquel mirror added.
32 fai-project maintains ubuntu and debian basefiles, but it doesn't update
33 them often. Better to build our all our own.
36 Args I've used before:
50 -h|--help Print help and exit.
52 Note: Uses GNU getopt options parsing style.
57 $this_dir/fai
/config
/basefiles
/mk-basefile
-h
67 if [[ $EUID != 0 ]]; then
71 cd /usr
/share
/debootstrap
/scripts
72 for d
in belenos flidas
; do
73 if [[ ! -L $d && ! -e $d ]]; then
78 if [[ ! -L $d && ! -e $d ]]; then
79 $s ln -sf trisquel etiona
;
82 if [[ $BASEFILE_DIR ]]; then
86 if awk '$2 == "/tmp" && $4 ~ /nodev/' /proc
/mounts |
grep -q . ||
[[ $?
== 141 ]]; then
87 $s mount
-o remount
,dev
/tmp
89 $s $this_dir/fai
/config
/basefiles
/mk-basefile
"$@"