#!/bin/sh # Cleaning envirnment # 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 "Cleaning system")" # Methods _info() { echo "$INFO_MESSAGE" } _migrate() { echo " * [ LliureX Up ] : Cleaning area " rm -rf "/tmp/lliurex-up-working-area.*" || true rm -f "/tmp/lliurex-up-check.log" || true if type update-initramfs >/dev/null 2>&1; then update-initramfs -u || true fi } _die() { echo " * [ LliureX Up ] : Error: $1" exit 1 } _usage() { echo " * [ LliureX Up ] : # Unknown argument" } ACTION="$1" case "$ACTION" in migrate|partial) _migrate ;; info) _info ;; *) _usage ;; esac exit 0