Reubicados los archivos en carpetas
This commit is contained in:
1 parent
e8efb7c4d0
commit
7c7bca5667
45 files changed
+93
-80
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
Executable
+68
@@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 || exit ; pwd -P )"
|
||||
readonly BASEDIR
|
||||
readonly SOURCE=~/roms/filtered
|
||||
C_BLUE=$(tput setaf 4)
|
||||
readonly C_BLUE
|
||||
C_NORMAL=$(tput sgr0)
|
||||
readonly C_NORMAL
|
||||
|
||||
## Elimina los directorios
|
||||
printf "%s\n" "${C_BLUE}elimina los directorios ...${C_NORMAL}"
|
||||
rm "${BASEDIR}"/bios
|
||||
rm -rdf "${BASEDIR}"/images
|
||||
rm -rdf "${BASEDIR}"/videos
|
||||
rm -rdf "${BASEDIR}"/roms
|
||||
|
||||
## Crea los directorios
|
||||
printf "%s\n" "${C_BLUE}crea los directorios ...${C_NORMAL}"
|
||||
ln -sv ~/roms/bios/retroarch "${BASEDIR}"/bios
|
||||
mkdir -pv "${BASEDIR}"/roms/arcade/lr-fbneo
|
||||
mkdir -pv "${BASEDIR}"/images
|
||||
mkdir -pv "${BASEDIR}"/videos
|
||||
|
||||
## Añade los enlaces a las roms
|
||||
printf "\n%s\n" "${C_BLUE}añade los enlaces a las roms de consola ...${C_NORMAL}"
|
||||
~/roms/packs/create_rom_pack.sh ${SOURCE} "${BASEDIR}"/roms console
|
||||
|
||||
printf "\n%s\n" "${C_BLUE}añade los enlaces a los juegos de cd ...${C_NORMAL}"
|
||||
~/roms/packs/create_rom_pack.sh ${SOURCE} "${BASEDIR}"/roms cd_system
|
||||
|
||||
## Elimina los sistemas que sobran
|
||||
printf "\n%s\n" "${C_BLUE}elimina las carpetas que sobran ...${C_NORMAL}"
|
||||
rm -rdfv "${BASEDIR}"/roms/dreamcast
|
||||
rm -rdfv "${BASEDIR}"/roms/psp
|
||||
rm -rdfv "${BASEDIR}"/roms/saturn
|
||||
|
||||
## Copia las roms de arcade
|
||||
printf "\n%s\n" "${C_BLUE}añade las roms de cps1 ...${C_NORMAL}"
|
||||
cp -v ${SOURCE}/cps1/*.zip "${BASEDIR}"/roms/arcade/lr-fbneo
|
||||
|
||||
printf "\n%s\n" "${C_BLUE}añade las roms de cps2 ...${C_NORMAL}"
|
||||
cp -v ${SOURCE}/cps2/*.zip "${BASEDIR}"/roms/arcade/lr-fbneo
|
||||
|
||||
## Escanea las roms para añadir las imagenes y videos
|
||||
printf "\n%s\n" "${C_BLUE}escanea las roms para añadir imagenes y videos ...${C_NORMAL}"
|
||||
~/code/bashscript/skyscraper.sh build emulationstation "${BASEDIR}"/roms
|
||||
|
||||
## Mueve las imagenes y los videos a sus respectivas carpetas
|
||||
printf "\n%s\n" "${C_BLUE}mueve las imagenes y los videos a sus respectivas carpetas ...${C_NORMAL}"
|
||||
for SYSTEM in $(find ./roms -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do
|
||||
printf "%s\n" "procesando las imagenes y videos de ${C_BLUE}${SYSTEM}${C_NORMAL} ..."
|
||||
if [ -d "${BASEDIR}"/roms/"${SYSTEM}"/media/ ]
|
||||
then
|
||||
mv "${BASEDIR}"/roms/"${SYSTEM}"/media/screenshots "${BASEDIR}"/images/"${SYSTEM}"
|
||||
mv "${BASEDIR}"/roms/"${SYSTEM}"/media/videos "${BASEDIR}"/videos/"${SYSTEM}"
|
||||
rm -rdf "${BASEDIR}"/roms/"${SYSTEM}"/media
|
||||
fi
|
||||
done
|
||||
if [ -d "${BASEDIR}"/images/arcade ]
|
||||
then
|
||||
mkdir -p "${BASEDIR}"/images/arcade/lr-fbneo
|
||||
mv "${BASEDIR}"/images/arcade/*.png "${BASEDIR}"/images/arcade/lr-fbneo
|
||||
fi
|
||||
|
||||
## Elimina los ficheros gamelist.xml
|
||||
printf "\n%s\n" "${C_BLUE}elimina los ficheros gamelist.xml ...${C_NORMAL}"
|
||||
find "${BASEDIR}" -type f -iname "gamelist.xml" -exec rm -v {} \;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
shopt -s nocasematch
|
||||
shopt -s nocaseglob
|
||||
|
||||
readonly letters="A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
|
||||
readonly numbers="0 1 2 3 4 5 6 7 8 9"
|
||||
|
||||
for i in $letters; do
|
||||
mkdir -p "$i"
|
||||
for element in "$i"*; do
|
||||
if [ "$element" != "$0" ] && [ "$element" != "$i" ]; then
|
||||
mv -v "$element" "$i"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
for i in $numbers; do
|
||||
mkdir -p "0-9"
|
||||
for element in "$i"*; do
|
||||
if [ "$element" != "$0" ] && [ "$element" != "$i" ]; then
|
||||
mv -v "$element" "0-9"
|
||||
fi
|
||||
done
|
||||
done
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
readonly BASEDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
readonly SOURCE=~/roms/filtered
|
||||
readonly C_BLUE=$(tput setaf 4)
|
||||
readonly C_NORMAL=$(tput sgr0)
|
||||
|
||||
# elimina los directorios
|
||||
printf "%s\n" "${C_BLUE}elimina los directorios ...${C_NORMAL}"
|
||||
rm ${BASEDIR}/bios
|
||||
rm -rdf ${BASEDIR}/images
|
||||
rm -rdf ${BASEDIR}/videos
|
||||
rm -rdf ${BASEDIR}/roms
|
||||
|
||||
# crea los directorios
|
||||
printf "%s\n" "${C_BLUE}crea los directorios ...${C_NORMAL}"
|
||||
ln -sv ~/roms/bios/retroarch ${BASEDIR}/bios
|
||||
mkdir -pv ${BASEDIR}/roms/arcade/lr-fbneo
|
||||
mkdir -pv ${BASEDIR}/images
|
||||
mkdir -pv ${BASEDIR}/videos
|
||||
|
||||
# añade los enlaces a las roms
|
||||
printf "\n%s\n" "${C_BLUE}añade los enlaces a las roms de consola ...${C_NORMAL}"
|
||||
~/roms/packs/create_rom_pack.sh ${SOURCE} ${BASEDIR}/roms console
|
||||
|
||||
printf "\n%s\n" "${C_BLUE}añade los enlaces a los juegos de cd ...${C_NORMAL}"
|
||||
~/roms/packs/create_rom_pack.sh ${SOURCE} ${BASEDIR}/roms cd_system
|
||||
|
||||
# elimina los sistemas que sobran
|
||||
printf "\n%s\n" "${C_BLUE}elimina las carpetas que sobran ...${C_NORMAL}"
|
||||
rm -rdfv ${BASEDIR}/roms/dreamcast
|
||||
rm -rdfv ${BASEDIR}/roms/psp
|
||||
rm -rdfv ${BASEDIR}/roms/saturn
|
||||
|
||||
# copia las roms de arcade
|
||||
printf "\n%s\n" "${C_BLUE}añade las roms de cps1 ...${C_NORMAL}"
|
||||
cp -v ${SOURCE}/cps1/*.zip ${BASEDIR}/roms/arcade/lr-fbneo
|
||||
|
||||
printf "\n%s\n" "${C_BLUE}añade las roms de cps2 ...${C_NORMAL}"
|
||||
cp -v ${SOURCE}/cps2/*.zip ${BASEDIR}/roms/arcade/lr-fbneo
|
||||
|
||||
# escanea las roms para añadir las imagenes y videos
|
||||
printf "\n%s\n" "${C_BLUE}escanea las roms para añadir imagenes y videos ...${C_NORMAL}"
|
||||
~/code/bashscript/skyscraper.sh build emulationstation ${BASEDIR}/roms
|
||||
|
||||
# mueve las imagenes y los videos a sus respectivas carpetas
|
||||
printf "\n%s\n" "${C_BLUE}mueve las imagenes y los videos a sus respectivas carpetas ...${C_NORMAL}"
|
||||
for SYSTEM in $(find ./roms -maxdepth 1 -mindepth 1 -type d -exec basename {} \;); do
|
||||
printf "%s\n" "procesando las imagenes y videos de ${C_BLUE}${SYSTEM}${C_NORMAL} ..."
|
||||
if [ -d ${BASEDIR}/roms/"${SYSTEM}"/media/ ]
|
||||
then
|
||||
mv ${BASEDIR}/roms/"${SYSTEM}"/media/screenshots ${BASEDIR}/images/"${SYSTEM}"
|
||||
mv ${BASEDIR}/roms/"${SYSTEM}"/media/videos ${BASEDIR}/videos/"${SYSTEM}"
|
||||
rm -rdf ${BASEDIR}/roms/"${SYSTEM}"/media
|
||||
fi
|
||||
done
|
||||
if [ -d ${BASEDIR}/images/arcade ]
|
||||
then
|
||||
mkdir -p ${BASEDIR}/images/arcade/lr-fbneo
|
||||
mv ${BASEDIR}/images/arcade/*.png ${BASEDIR}/images/arcade/lr-fbneo
|
||||
fi
|
||||
|
||||
# elimina los ficheros gamelist.xml
|
||||
printf "\n%s\n" "${C_BLUE}elimina los ficheros gamelist.xml ...${C_NORMAL}"
|
||||
find ${BASEDIR} -type f -iname "gamelist.xml" -exec rm -v {} \;
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
letters="A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
|
||||
|
||||
for i in $letters; do
|
||||
mkdir -p $i
|
||||
mv $i*.zip $i
|
||||
done
|
||||
|
||||
mkdir -p numbers
|
||||
numbers="0 1 2 3 4 5 6 7 8 9"
|
||||
for i in $numbers; do
|
||||
mv 0*.zip numbers
|
||||
mv $i*.zip numbers
|
||||
done
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user