Make sure song_paths is empty in categorise
authorCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 15:40:47 +0000 (23:40 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Mon, 8 Apr 2019 15:40:47 +0000 (23:40 +0800)
Categorise.sh

index cd9ab66..fc08c40 100755 (executable)
@@ -20,7 +20,7 @@ if [ "$1" = "apply" ]; then
         rm -rf "$path_to_songs/$footspeed_folder"
         mkdir "$path_to_songs/$footspeed_folder"
         declare -A song_paths
-
+        song_paths=()
         for i in "${lines[@]}"; do
             if [ -z "${song_paths[$i]}" ]; then
                 song_paths["$i"]+=$(grep $i "${DIR}/${songs_file}" | cut -sd / -f5-6)
@@ -47,7 +47,7 @@ if [ "$1" = "apply" ]; then
         rm -rf "$path_to_songs/$stamina_folder"
         mkdir "$path_to_songs/$stamina_folder"
         declare -A song_paths
-
+        song_paths=()
         for i in "${lines[@]}"; do
             if [ -z "${song_paths[$i]}" ]; then
                 song_paths["$i"]+=$(grep $i "${DIR}/${songs_file}" | cut -sd / -f5-6)