#!/bin/sh # gettext domain TEXTDOMAIN="lliurex-up" export TEXTDOMAIN # APT PINNING FILE PINNING_FILE="/usr/share/lliurex-up/lliurex-pinning.cfg" PINNING_DEST="/etc/apt/preferences.d/lliurex-pinning" # APT CONFIGURATION FILE APT_CONF_FILE="/usr/share/lliurex-up/99lliurex-conf" APT_CONF_DEST="/etc/apt/apt.conf.d/99lliurex-conf" COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh" if [ -r $COMMON_LIBRARY ] ; then . $COMMON_LIBRARY fi #gettext messages INFO_MESSAGE="$(gettext "Fixed pinning")" # Methods _info() { echo "$INFO_MESSAGE" } _usage() { echo " * [ LliureX Up ] : # Unknown argument" } _migrate() { [ -f "$PINNING_DEST" ] || cp -f "$PINNING_FILE" "$PINNING_DEST" [ -f "${APT_CONF_DEST}" ] || cp -f "${APT_CONF_FILE}" "${APT_CONF_DEST}" } _die() { echo " * [ LliureX Up ] : Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate) _migrate ;; info) _info ;; *) _usage ;; esac exit 0