bugged-racing/scripts/build-soundtrack

25 lines
573 B
Plaintext
Raw Normal View History

2021-11-12 11:36:38 +00:00
#!/bin/sh
set -e
OLDWD=$PWD
SCRIPTD=$(dirname "$0")
ROOTD="$SCRIPTD/.."
ASSETS_DIR="$ROOTD/assets"
MUSIC_SOURCE_DIR="$ASSETS_DIR/source/music"
MUSIC_OUTPUT_DIR="$MUSIC_SOURCE_DIR/target"
MUSIC_ASSETS_DIR="$ASSETS_DIR/music"
2021-11-12 12:10:07 +00:00
echo "Removing all wav files from $MUSIC_OUTPUT_DIR"
rm -f "$MUSIC_OUTPUT_DIR/"*.wav
2021-11-12 11:36:38 +00:00
cd $MUSIC_SOURCE_DIR
2021-11-12 12:10:07 +00:00
echo "Building songs"
2021-11-12 11:36:38 +00:00
clj -M prod.clj soundtrack
cd $OLDWD
2021-11-12 12:10:07 +00:00
echo "Removing all wav files from $MUSIC_ASSETS_DIR"
rm -f "$MUSIC_ASSETS_DIR/"*.wav
2021-11-12 11:36:38 +00:00
mv "$MUSIC_OUTPUT_DIR/"*.wav "$MUSIC_ASSETS_DIR/"
2021-11-12 12:10:07 +00:00
echo "Moved all songs to $MUSIC_ASSETS_DIR"