76 lines
2.0 KiB
Bash
Executable File
76 lines
2.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# Script para copiar arquivos para um diretório ROOTFS existente
|
|
|
|
# Verifica se o usuário é root
|
|
if [ "$(id -u)" -ne 0 ]; then
|
|
echo "Este script precisa ser executado com permissões de root."
|
|
exit 1
|
|
fi
|
|
|
|
# Verifica se o diretório ROOTFS foi passado como argumento
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Uso: $0 <caminho_para_ROOTFS>"
|
|
exit 1
|
|
fi
|
|
|
|
# Define o diretório ROOTFS a partir do argumento fornecido
|
|
ROOTFS="$1"
|
|
|
|
# Verifica se o diretório ROOTFS existe
|
|
if [ ! -d "$ROOTFS" ]; then
|
|
echo "Diretório ROOTFS não encontrado: $ROOTFS"
|
|
exit 1
|
|
fi
|
|
|
|
# Copiando os arquivos para os diretórios apropriados dentro de ROOTFS
|
|
mkdir -p "$ROOTFS/etc"
|
|
cp os-release/* "$ROOTFS/etc"
|
|
|
|
mkdir -p "$ROOTFS/etc/skel"
|
|
cp face/* "$ROOTFS/etc/skel"
|
|
|
|
mkdir -p "$ROOTFS/etc/skel/.config"
|
|
cp -r xfce/* "$ROOTFS/etc/skel/.config"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/backgrounds"
|
|
cp -r wallpaper/* "$ROOTFS/usr/share/backgrounds"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/icons"
|
|
cp -r icons/* "$ROOTFS/usr/share/icons"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/themes"
|
|
cp -r theme/* "$ROOTFS/usr/share/themes"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/polkit-1/actions"
|
|
cp polkit/* "$ROOTFS/usr/share/polkit-1/actions"
|
|
|
|
mkdir -p "$ROOTFS/usr/lib/python3/dist-packages"
|
|
cp -r pylibraries/* "$ROOTFS/usr/lib/python3/dist-packages"
|
|
|
|
mkdir -p "$ROOTFS/etc/skel/.local/share/pmostools"
|
|
cp -r pmostools/* "$ROOTFS/etc/skel/.local/share/pmostools"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/pixmaps"
|
|
cp -r PepProPixMaps/* "$ROOTFS/usr/share/pixmaps"
|
|
|
|
mkdir -p "$ROOTFS/etc/skel/.config/autostart"
|
|
cp autostart/* "$ROOTFS/etc/skel/.config/autostart"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/fonts/pepconf"
|
|
cp font/* "$ROOTFS/usr/share/fonts/pepconf"
|
|
|
|
mkdir -p "$ROOTFS/usr/local/bin"
|
|
cp -r PepProTools/* "$ROOTFS/usr/local/bin"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/applications"
|
|
cp application/* "$ROOTFS/usr/share/applications"
|
|
|
|
mkdir -p "$ROOTFS/etc/lightdm"
|
|
cp lightdm/* "$ROOTFS/etc/lightdm"
|
|
|
|
mkdir -p "$ROOTFS/usr/share/pep-artwork"
|
|
cp -r artwork/* "$ROOTFS/usr/share/pep-artwork"
|
|
|
|
# Mensagem de sucesso
|
|
echo "Arquivos copiados com sucesso para $ROOTFS"
|