-
Notifications
You must be signed in to change notification settings - Fork 0
/
extract_and_format_db.sh
40 lines (30 loc) · 1.1 KB
/
extract_and_format_db.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
DATASET_ZIP=${1:-"./data/"}
ROOT_FOLDER=$(dirname $DATASET_ZIP)
set -e
PREV_DIR=$(pwd)
cd $ROOT_FOLDER
unzip IDMT-SMT-AUDIO-EFFECTS.zip
mv IDMT-SMT-AUDIO-EFFECTS/IDMT-SMT-AUDIO-EFFECTS/* IDMT-SMT-AUDIO-EFFECTS/
rm -r IDMT-SMT-AUDIO-EFFECTS/IDMT-SMT-AUDIO-EFFECTS/
cd IDMT-SMT-AUDIO-EFFECTS
rm Gitarre_polyphon2.zip
mv 'Bass monophon2.zip' Bass_monophon2.zip
mv 'Bass monophon.zip' Bass_monophon.zip
mv 'Gitarre monophon2.zip' Gitarre_monophon2.zip
mv 'Gitarre monophon.zip' Gitarre_monophon.zip
mv 'Gitarre polyphon2.zip' Gitarre_polyphon2.zip
mv 'Gitarre polyphon.zip' Gitarre_polyphon.zip
for file in $(ls *.zip); do unzip $file; done
rm *.zip
mv Bass\ monophon Bass_monophon
mv Bass\ monophon2 Bass_monophon2
mv Gitarre\ monophon Gitarre_monophon
mv Gitarre\ monophon2 Gitarre_monophon2
mv Gitarre\ polyphon Gitarre_polyphon
mv Gitarre\ polyphon2 Gitarre_polyphon2
cp -r Bass_monophon2/Samples/* Bass_monophon/Samples
cp -r Gitarre_monophon2/Samples/* Gitarre_monophon/Samples
cp -r Gitarre_polyphon2/* Gitarre_polyphon/Samples
rm -rf Gitarre_polyphon2 Gitarre_monophon2 Bass_monophon2
cd $PREV_DIR