#5576 Reestructurar el directorio de imagenes #1618

Open
alexandre wants to merge 37 commits from 5576-reestructurar-directorio-imagenes into dev
2 changed files with 0 additions and 5 deletions
Showing only changes of commit 55b737f376 - Show all commits

View File

@ -17,14 +17,11 @@ for image in "$MAIN_DIR"/*; do
imageName="${fileName%.*}"
hash=$(echo -n "$imageName" | sha1sum | awk '{print $1}')
first=$(echo "$hash" | cut -c"$START"-"$DIR_LEVELS")
echo "$first"
second=$(echo "$hash" | cut -c"$DIR_LEVELS"-"$END")
echo "$second"
path=$(dirname "$image")/${first}/${second}
mkdir -p $path
# Crear un enlace simbólico en la carpeta principal
mv $image $path/$fileName
fi
# done
# fi

View File

@ -6,8 +6,6 @@ for collection in */ ; do
fileName=$(basename "$image")
imageName="${fileName%.*}"
hash=$(echo -n "$imageName" | sha1sum | awk '{print $1}')
echo $image
echo ${hash:2:2}/${hash:0:2}
mkdir -p $(dirname "$image")/${hash:2:2}/${hash:0:2}
ln -s $image $(dirname "$image")/${hash:2:2}/${hash:0:2}/$fileName
done