Añadido get_rgbpi_roms.sh

This commit is contained in:
2023-08-03 16:13:33 +02:00
parent 45142cc2ce
commit eb81c8ab38
2 changed files with 98 additions and 2 deletions
+8 -2
View File
@@ -1,8 +1,12 @@
#!/bin/bash #!/bin/bash
file="/home/sergio/jailers/list.txt" file="/home/sergio/jailers/list2.txt"
src="/home/sergio/jailers/" src="/home/sergio/jailers/"
dst="/home/sergio/pas/" dst="/home/sergio/pas/"
rm -rdf $dst
mkdir -p $dst
i=1 i=1
while read -r line; do while read -r line; do
@@ -10,6 +14,8 @@ while read -r line; do
#Reading each line #Reading each line
echo "Line No. $i : $line" echo "Line No. $i : $line"
mkdir -p "$dst$line" mkdir -p "$dst$line"
cp -v "$src$line"/* "$dst$line" cp -vpr "$src$line"/* "$dst$line"
i=$((i+1)) i=$((i+1))
printf "\n"
done < $file done < $file
+90
View File
@@ -0,0 +1,90 @@
#!/bin/bash
# Script para copiar las roms de RGBPI
## Comprueba los parametros
if [ "$#" -ne 1 ]; then
printf "No ha especificado destino\n"
exit 0
else
DESTINO=$1
readonly DESTINO
fi
# Crea el directorio de destino de copia
if ! test -d "$DESTINO"; then
mkdir -p "$DESTINO"
fi
# Origen de la copia
ORIGEN=maverick:/home/sergio/roms/ROMs_ALL
readonly ORIGEN
# Copia los sistemas con una sola carpeta
SISTEMAS="dreamcast mastersystem neogeo psx sg-1000"
readonly SISTEMAS
OK=1
if [ "$OK" -ne 0 ]; then
for SISTEMA in $SISTEMAS; do
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/"${SISTEMA}/" "${DESTINO}/${SISTEMA}/"
done
# ARCADE
SISTEMA=arcade/fbneo
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/cps1/ "${ORIGEN}"/cps2/ "${ORIGEN}"/cps3/ "${DESTINO}/${SISTEMA}/"
# SNES
SISTEMA=snes
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/snes/ "${ORIGEN}"/snesna/ "${ORIGEN}"/sfc/ "${DESTINO}/${SISTEMA}/"
# NES
SISTEMA=nes
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/nes/ "${ORIGEN}"/famicom/ "${DESTINO}/${SISTEMA}/"
# MEGACD
SISTEMA=megacd
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/megacd/ "${ORIGEN}"/megacdjp/ "${ORIGEN}"/segacd/ "${DESTINO}/${SISTEMA}/"
# 32X
SISTEMA=sega32x
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/sega32x/ "${ORIGEN}"/sega32xjp/ "${ORIGEN}"/sega32xna/ "${DESTINO}/${SISTEMA}/"
# MEGADRIVE
SISTEMA=megadrive
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/megadrive/ "${ORIGEN}"/genesis/ "${DESTINO}/${SISTEMA}/"
# PCENGINE
SISTEMA=pcengine
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/pcengine/ "${ORIGEN}"/tg16/ "${ORIGEN}"/supergrafx/ "${DESTINO}/${SISTEMA}/"
# PCENGINECD
SISTEMA=pcenginecd
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/pcenginecd/ "${ORIGEN}"/tg-cd/ "${DESTINO}/${SISTEMA}/"
# NEOGEOCD
SISTEMA=neocd
printf "\n\n>>> %s\n" "${SISTEMA}"
mkdir -p "${DESTINO}/${SISTEMA}"
rsync -avhPL --delete --chmod=755 "${ORIGEN}"/neogeocd/ "${ORIGEN}"/neogeocdjp/ "${DESTINO}/${SISTEMA}/"
fi