_script="$(realpath ${BASH_SOURCE[0]})" _scriptname="$(basename $_script)" _scriptdir="$(dirname $_script)" _modulename="$(basename $_scriptdir)" DOT_MODULE_NAME="ly" function preinstall() { PACKAGES+=("ly") } function install() { # backup old file if it exists and we haven't backed it up before if ! [[ -f "$_scriptdir/.firstrun" ]]; then if [[ -f "/etc/ly/config.ini" ]] && ! [[ -f "/etc/ly/config.ini.bak" ]]; then log verbose "making backup of config.ini" cp -r "/etc/ly/config.ini" "/etc/ly/config.ini.bak" fi touch "$_scriptdir/.firstrun" fi log info "linking config.ini" rm -rf "/etc/ly/config.ini" ln -sf "$_scriptdir/config.ini" "/etc/ly/config.ini" }