#!/bin/bash # gettext domain TEXTDOMAIN="lliurex-up" export TEXTDOMAIN COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh" if [ -r $COMMON_LIBRARY ] ; then . $COMMON_LIBRARY fi #gettext messages INFO_MESSAGE="$(gettext "Update the sources list on server")" _usage() { echo "# Unknown argument" } _info() { echo "$INFO_MESSAGE" } _migrate() { if [ -z $LLIUREX_UP_IGNORE_SOURCES ]; then rc=0 cat /etc/apt/sources.list | grep -q "^deb http://lliurex.net/platinum" || rc=1 if [ $rc -eq 1 ] ; then echo "deb http://lliurex.net/platinum pandora main restricted universe multiverse partner" >> /etc/apt/sources.list fi else echo "[ LliureX Up ] checking is ignored by LLIUREX_UP_IGNORE_SOURCES" fi } ACTION="$1" case "$ACTION" in migrate) _migrate ;; info) _info ;; *) _usage ;; esac