#!/bin/bash

set -u

source custom/paths.sh

version=$(setman-restore "tpnMmuConfiguratorAppSettings" version.txt)
if [ $? -ne 0 ]; then
    version=1
fi

setman-restore "tpnMmuConfiguratorAppSettings" system-descriptor.json > ${system_descriptor_path}
if [ $version -eq 2 ]; then
    setman-restore "tpnMmuConfiguratorAppSettings" settings.json > ${settings_path}
fi
