#!/bin/bash
CUR_DIR=$PWD

cd /opt/bogen

rm -rf	config \
	ext \
	home \
	lib \
	network.config \
	nyq-appliance \
	opt \
	opus-* \
	pjproject-* \
	root \
	submodules \
	tmp \
	update_firmware \
	packages

find appliance ! -name '*.config' -a ! -name 'E7020.hex' -a ! -name 'scs.hex' -a ! -name 'sd.hex' -type f -exec rm -f {} +
find appliance -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \;

cd $CUR_DIR
