Last active
October 17, 2018 19:10
-
-
Save user5145/ce972f3f81a285ff6a591b886828828d to your computer and use it in GitHub Desktop.
create osz files from old osu's songs folder using bash
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/bash | |
set -e | |
#path to songs folder | |
songs=$(readlink -f "songs") | |
saveto=$(readlink -f "songs-osz") | |
echo "your files will be in $saveto" | |
#create a dir | |
mkdir -p "$saveto" | |
#for each song | |
cd "$songs" && for f in *; do | |
echo "the next file is $f" | |
# for each file in song's folder | |
echo "entering $f" | |
cd "$f" && for f2 in *; do | |
zip -0r "$saveto/$f.osz" "./$f2" | |
done | |
echo "leaving $f" | |
cd .. | |
done | |
echo "finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment