#!/bin/bash

#set -x

rlm_path="/home/tomi/projekty/rlm"

# include all program files
for file in $rlm_path/*.sh; do
  [ "${file##*/}" != rlm.sh ] && . $file
done
#. $rlm_path/misc.sh     # needed for update, gui
#. $rlm_path/configs.sh  # needed for update
#. $rlm_path/leveldir.sh # needed for update
#. $rlm_path/menusys.sh  # needed for gui
#. $rlm_path/menu.sh     # needed for gui



# make user's packages directory if not yet created
[ -d "$packages" ] || mkdir "$packages"

# check for new packages and make symlinks for them
update_packages_everywhere

# update levelinfo files of levelgroups
update_levelgroups

# launch RnD, if needed
[ "$1" == "rocksndiamonds" ] && launch_rnd

# launch RLM menu, if needed
[ "$1" == "gui" ] && menu_main

bdfans_list_download
bdfans_list_parse

