Last active
February 7, 2023 03:02
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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