Setup script modified to work on live USBs

This commit is contained in:
CosmicScale 2024-12-18 19:44:38 +00:00
parent b04097b661
commit ba7c65d351

View File

@ -13,8 +13,22 @@ echo
echo " This script installs all dependencies required for the 'PSBBN Installer' and 'Game Installer'." echo " This script installs all dependencies required for the 'PSBBN Installer' and 'Game Installer'."
echo " It must be run first." echo " It must be run first."
echo echo
echo "Press any key to continue..." read -p " Press any key to continue..."
read -n 1 -s echo
# Path to the sources.list file
SOURCES_LIST="/etc/apt/sources.list"
# Check if the file exists
if [[ -f "$SOURCES_LIST" ]]; then
# Remove the "deb cdrom" line and store the result
if grep -q 'deb cdrom' "$SOURCES_LIST"; then
sudo sed -i '/deb cdrom/d' "$SOURCES_LIST"
echo "'deb cdrom' line has been removed from $SOURCES_LIST."
else
echo "No 'deb cdrom' line found in $SOURCES_LIST."
fi
fi
# Update package list and install necessary packages # Update package list and install necessary packages
sudo apt update && sudo apt install -y axel imagemagick xxd python3-venv python3-pip nodejs npm sudo apt update && sudo apt install -y axel imagemagick xxd python3-venv python3-pip nodejs npm