2023-04-21 00:08:14 +00:00
|
|
|
#!/bin/sh -e
|
2023-04-09 19:04:38 +00:00
|
|
|
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#
|
2023-07-16 10:56:13 +00:00
|
|
|
# SPDX-FileCopyrightText: 2023 PeppermintOS Team (peppermintosteam@proton.me)
|
2023-04-09 19:04:38 +00:00
|
|
|
|
2023-04-15 14:47:17 +00:00
|
|
|
# This script copies a file to the chroot and runs commands during the Debian installation process.
|
|
|
|
|
|
|
|
# setup a folder structure
|
2023-04-15 17:43:43 +00:00
|
|
|
mkdir -p /target/etc/skel/.local/share/pmostools
|
2023-05-28 20:03:33 +00:00
|
|
|
mkdir -p /target/etc/skel/.config/autostart
|
2023-04-19 11:08:03 +00:00
|
|
|
mkdir -p /target/opt/pepconf
|
2023-04-15 17:43:43 +00:00
|
|
|
mkdir -p /target/opt/pypep/dbpep
|
2023-05-23 09:08:34 +00:00
|
|
|
mkdir -p /target/etc/default
|
|
|
|
mkdir -p /target/etc/apt/sources.list.d
|
|
|
|
mkdir -p /target/etc/apt
|
|
|
|
mkdir -p /target/etc/apt/trusted.gpg.d
|
|
|
|
mkdir -p /target/usr/share/keyrings
|
|
|
|
mkdir -p /target/usr/share/applications
|
|
|
|
mkdir -p /target/opt/pepconf
|
|
|
|
mkdir -p /target/opt/pypep/dbpep
|
|
|
|
mkdir -p /target/usr/share/polkit-1/actions
|
|
|
|
mkdir -p /target/usr/share/pixmaps
|
|
|
|
mkdir -p /target/etc/lightdm
|
|
|
|
mkdir -p /target/usr/lib/python3/dist-packages
|
2023-05-28 02:45:32 +00:00
|
|
|
mkdir -p /target/boot/grub
|
2023-04-09 19:04:38 +00:00
|
|
|
|
|
|
|
# Copy files to the chroot directory
|
2023-04-15 14:47:17 +00:00
|
|
|
cp /preseed/grub/grub /target/etc/default
|
|
|
|
cp /preseed/repos/multimedia.list /target/etc/apt/sources.list.d
|
|
|
|
cp /preseed/repos/peppermint.list /target/etc/apt/sources.list.d
|
|
|
|
cp /preseed/repos/sources.list /target/etc/apt
|
|
|
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/etc/apt/trusted.gpg.d
|
|
|
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/etc/apt/trusted.gpg.d
|
|
|
|
cp /preseed/keyrings/deb-multimedia-keyring.gpg /target/usr/share/keyrings
|
|
|
|
cp /preseed/keyrings/peppermint-keyring.gpg /target/usr/share/keyrings
|
2023-04-19 11:08:03 +00:00
|
|
|
cp /preseed/apps/* /target/usr/share/applications
|
|
|
|
cp /preseed/conf/* /target/opt/pepconf
|
2023-04-15 14:47:17 +00:00
|
|
|
cp /preseed/database/* /target/opt/pypep/dbpep
|
|
|
|
cp /preseed/polkit/* /target/usr/share/polkit-1/actions
|
|
|
|
cp /preseed/pixmaps/* /target/usr/share/pixmaps
|
2023-04-21 01:36:56 +00:00
|
|
|
cp /preseed/lightdm/* /target/etc/lightdm
|
2023-05-30 17:16:19 +00:00
|
|
|
cp /preseed/autostart/* /target/etc/skel/.config/autostart
|
2023-04-15 15:14:45 +00:00
|
|
|
|
2023-04-15 14:47:17 +00:00
|
|
|
# Copy recursive files and sub-directories
|
2023-04-21 14:20:53 +00:00
|
|
|
cp -r /preseed/grub/themes /target/boot/grub
|
2023-05-28 17:42:16 +00:00
|
|
|
cp -r /preseed/protools/* /target/usr/local/bin
|
2023-04-15 14:47:17 +00:00
|
|
|
cp -r /preseed/py/* /target/usr/lib/python3/dist-packages
|
2023-04-15 17:43:43 +00:00
|
|
|
cp -r /preseed/tools/* /target/etc/skel/.local/share/pmostools
|
2023-04-09 19:04:38 +00:00
|
|
|
|
|
|
|
# Run a commands in the chroot
|
2023-04-16 13:22:47 +00:00
|
|
|
cd /target/usr/share/python-apt/templates/
|
2023-04-09 19:04:38 +00:00
|
|
|
ln -s Debian.info Peppermint.info
|
|
|
|
ln -s Debian.mirrors Peppermint.mirrors
|
2023-04-11 11:07:55 +00:00
|
|
|
cd /target/usr/share/distro-info/
|
2023-04-09 19:04:38 +00:00
|
|
|
ln -s debian.csv peppermint.csv
|
2023-04-15 14:47:17 +00:00
|
|
|
cd /target/usr/share/
|
2023-04-15 17:43:43 +00:00
|
|
|
ln -s icons pepicons
|
|
|
|
ln -s themes pepthemes
|
|
|
|
ln -s backgrounds pepwallpaper
|
2023-04-15 14:47:17 +00:00
|
|
|
chmod 777 pepicons
|
|
|
|
chmod 777 pepthemes
|
|
|
|
chmod 777 pepwallpaper
|
2023-04-09 19:04:38 +00:00
|
|
|
|
2023-04-16 13:22:47 +00:00
|
|
|
# update gub and initramfs
|
|
|
|
chroot /target update-initramfs -u
|
|
|
|
chroot /target update-grub
|
2023-04-15 15:14:45 +00:00
|
|
|
|
|
|
|
|
2023-04-15 14:47:17 +00:00
|
|
|
exit 0
|
2023-04-09 19:04:38 +00:00
|
|
|
|