Skip to content

Instantly share code, notes, and snippets.

@symant233
Last active February 7, 2023 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save symant233/6df6be7e1f44fe9dee2bb411c3cd9323 to your computer and use it in GitHub Desktop.
Save symant233/6df6be7e1f44fe9dee2bb411c3cd9323 to your computer and use it in GitHub Desktop.
A script for Tachiyomi, making folders for single zip files in `/Tachiyomi/local` folder.
#!/bin/sh
# Author: symant233
# Description: A script for Tachiyomi, making folders for single zip files
# in `/Tachiyomi/local` folder. Put this script in `/Tachiyomi` folder.
find ./local -mindepth 1 -maxdepth 1 -type f | while read dir
do
(
file="$(basename -- "$dir")"
extension="${file##*.}"
filename="${file%.*}"
if [ $extension = "zip" ] ; then
echo "parsing $file"
mkdir -p "./local/${filename}"
mv "$dir" "./local/${filename}/"
fi
)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment