#!/bin/sh # Update cache # 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 software cache")" # Methods _info() { echo "$INFO_MESSAGE" } _migrate() { echo "$INFO_MESSAGE" if [ "${LLIUREX_UP_NO_UPDATE}" = "yes" ] ; then echo "NO $INFO_MESSAGE" else apt-get update fi } _usage() { echo "# Unknown argument" } _die() { echo "Error: $1" exit 1 } ACTION="$1" case "$ACTION" in migrate|partial) _migrate ;; info) _info ;; *) _usage ;; esac exit 0