#!/usr/bin/env bash

# Path to the rrgbis configuration directory.
RRGBIS="$HOME/.rrgbis"
# Path to the rrgbis configuration file.
RRGBIS_SETTINGS="$RRGBIS/settings.dat"

# Create the rrgbis configuration directory if it doesn't already exist.
mkdir -p "$RRGBIS"

# If the settings file doesn't exist copy it from the default location in
# ${prefix}/share/rrgbis.
if [[ ! -f "$RRGBIS_SETTINGS" ]]; then
    cp __PREFIX__/share/rrgbis/settings.dat "$RRGBIS_SETTINGS"
    echo "Installed default configuration file in $RRGBIS"
else
    echo "Configuration file already exists in $RRGBIS"
fi
