#!/bin/bash # Simple script to upgrade lliurex with one-shot # This script is licensed under GPL-V3 or higher # And remember : "A great power remains great responsability" _usage() { echo "[USAGE] " echo " lliurex-upgrade -> Upgrade the system with a amazing scripts" echo " lliurex-upgrade [info|--info] -> Shows the lliurex-upgrade steps" echo " lliurex-upgrade [help|--help|-h|-?] -> Shows this help" echo " lliurex-upgrade [sai|--ignore-sources|--sai|-s] -> Update the system without checking sources.list" } # Some sanity checks if [ "$(id -u)" != "0" ]; then echo "You must be root tu run this script, sorry" exit 0 fi # Some additional parameters to make additional actions without # losing compatibility # Capture parameters ACTION="$1" case $ACTION in info|--info) llxcfg-upgrade-version-scripts info exit 0 ;; help|--help|-h|-?) _usage exit 0 ;; sai|--ignore-sources|--sai|-s) export LLIUREX_UP_IGNORE_SOURCES="yes" ;; *) echo "[LliureX Up] Unknown parameter -> Also you want a upgrade" echo "[LliureX UP] Upgrade is always a default option" ;; esac # Do the upgrade llxcfg-upgrade-version-scripts migrate exit 0