# This script should be run from the root directory of the project.

log(){
    echo "[INFO] $1"
}

log "Cleaning old files..."
grunt clean

log "Deleting old files RecordRTC.js and RecordRTC.min.js"
rm RecordRTC.js
rm RecordRTC.min.js

log "Building new files..."
grunt

current_path=$(pwd)
log "New file RecordRTC.js is created at path: ${current_path}/RecordRTC.js."