From 26397e32717642ad0da3f109f822274c1f7af9e1 Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 16 Nov 2023 13:26:22 -0100 Subject: [PATCH] reparar a falta da pasta de scripts --- scripts/07final-cleanup | 18 ++++++++++++++++++ scripts/07grub-config | 33 +++++++++++++++++++++++++++++++++ scripts/07rebuild-icon-caches | 13 +++++++++++++ scripts/07update-system | 16 ++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100755 scripts/07final-cleanup create mode 100755 scripts/07grub-config create mode 100755 scripts/07rebuild-icon-caches create mode 100755 scripts/07update-system diff --git a/scripts/07final-cleanup b/scripts/07final-cleanup new file mode 100755 index 00000000..b94fa562 --- /dev/null +++ b/scripts/07final-cleanup @@ -0,0 +1,18 @@ +#!/bin/sh -e + +################################################################################ +# Title: build-all.sh +# Description: This script removes unwanted software and files after Debian installation. +# Author: manuel rosa +# Date: Outubro 29, 2023 +# License: GPL-3.0-or-later +################################################################################ + +# Remove unwanted packages +chroot /target apt purge --autoremove -y \ + raspi-firmware \ + calamares \ + calamares-settings* + +# Clean unnecessary files +rm -r /target/boot/firmware diff --git a/scripts/07grub-config b/scripts/07grub-config new file mode 100755 index 00000000..e72ac5fc --- /dev/null +++ b/scripts/07grub-config @@ -0,0 +1,33 @@ +#!/bin/sh -e + +################################################################################ +# Title: Grub-config +# Description: This script configures grub defaults after Debian installation. +# Author: manuel rosa +# Date: Outubro 29, 2023 +# License: GPL-3.0-or-later +################################################################################ + +# Defines the variables +GRUB_DEFAULT=0 +GRUB_TIMEOUT=5 +GRUB_DISTRIBUTOR="My-distro" +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" +GRUB_CMDLINE_LINUX="" +GRUB_GFXMODE=1440x900 +GRUB_DISABLE_OS_PROBER=false + +# GRUB configuration file path +GRUB_CONFIG_FILE="/target/etc/default/grub" + +# Modify the GRUB file +sed -i "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=$GRUB_DEFAULT/" $GRUB_CONFIG_FILE +sed -i "s/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=$GRUB_TIMEOUT/" $GRUB_CONFIG_FILE +sed -i "s/^GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"$GRUB_DISTRIBUTOR\"/" $GRUB_CONFIG_FILE +sed -i "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"$GRUB_CMDLINE_LINUX_DEFAULT\"/" $GRUB_CONFIG_FILE +sed -i "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"$GRUB_CMDLINE_LINUX\"/" $GRUB_CONFIG_FILE +sed -i "s/^#GRUB_GFXMODE=.*/GRUB_GFXMODE=$GRUB_GFXMODE/" $GRUB_CONFIG_FILE +sed -i "s/^#GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=$GRUB_DISABLE_OS_PROBER/" $GRUB_CONFIG_FILE + +# Run update-grub after modifying the file +chroot /target update-grub diff --git a/scripts/07rebuild-icon-caches b/scripts/07rebuild-icon-caches new file mode 100755 index 00000000..52f0abef --- /dev/null +++ b/scripts/07rebuild-icon-caches @@ -0,0 +1,13 @@ +#!/bin/sh -e + +################################################################################ +# Title: rebuild-icon-caches +# Description: This script rebuilds the icon caches after Debian installation. +# Author: manuel rosa +# Date: Outubro 29, 2023 +# License: GPL-3.0-or-later +################################################################################ + +# Rebuild the icon caches +chroot /target find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \; + diff --git a/scripts/07update-system b/scripts/07update-system new file mode 100755 index 00000000..c2dc42e6 --- /dev/null +++ b/scripts/07update-system @@ -0,0 +1,16 @@ +#!/bin/sh -e + +################################################################################ +# Title: build-all.sh +# Description: This script updates the system after Debian installation. +# Author: manuel rosa +# Date: Outubro 29, 2023 +# License: GPL-3.0-or-later +################################################################################ + +# Update the system +chroot /target apt update +chroot /target apt upgrade -y + +# Clean up unnecessary packages +chroot /target apt autoremove -y