#!/bin/bash

# Get into the proper directory to run the commands
if [[ -z "${NMROOT}" ]]; then
  echo "WARNING: NMROOT is not defined, using script working directory"
  NMROOT=$(dirname "$0")
  echo $NMROOT
fi
cd $NMROOT

# Clean up, remove files that are not necessary
gradle clean # NXM-3755 since NeXtMidas 4.0.1

# This will remove all links created to make a gradle directory structure. Since NeXtMidas 3.9.3
rm -rf audio backuplegacy database dsp hwc minio net nettest sys ucl vnc webvnc build.gradle common.gradle settings.gradle gradle.properties
mv gradle/.classpath.orig ./.classpath
rm -rf xbc.tar