@wallhackio this motherfucker typed esac
@Lady @wallhackio i think file is fur a recursive directory search? otherwise yeah he overengineered it (and unreliably so at that)
@aescling @wallhackio file is for a recursive directory search but there is no reason why you can¦t call file in a makefile
@aescling @wallhackio *find. find is for that.
file is just for getting the type of the file
@Lady @wallhackio i don't think you can do it in a Makefile in a way that is reliable since files can have newlines in them but 99% of the time it would be fine so whatever
@aescling @wallhackio files cannot have newlines in them that is absurd
they can have spaces in them however,,
@Lady @wallhackio POSIX has allowed newlines in a filename since furever
@aescling @wallhackio you are the operator of your computer, not POSIX
@aescling @wallhackio (did you know that a file with the name `Icon´ followed by a carriage return is how macOS has stored folder icons since forever? 🌠)
@Lady @wallhackio no i did not
@wallhackio if you are doing `${file%flac}mp3"´ anyway can¦t you just switch on file extension rather than making a call to `file´?
if it were me i would parallelize this by using GNU Make which has a parallelization option
probably, to get all the functionality you want, creating some default rules to generate a %.mp3 from a %.flac and a fallback match-anything rule that treats its target as a directory (using FORCE) with secondary expansion to set the child files as dependencies from the target name dynamically (i think that works…)
but i¦m sure there is a more sane way