Last change
on this file since 464 was
464,
checked in by jrpelegrina, 5 years ago
|
First release to Xenial
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | # Simple script to upgrade lliurex with one-shot |
---|
4 | # This script is licensed under GPL-V3 or higher |
---|
5 | # And remember : "A great power remains great responsability" |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | _usage() |
---|
10 | { |
---|
11 | echo "[USAGE] " |
---|
12 | echo " lliurex-upgrade -> Upgrade the system with a amazing scripts" |
---|
13 | echo " lliurex-upgrade [info|--info] -> Shows the lliurex-upgrade steps" |
---|
14 | echo " lliurex-upgrade [help|--help|-h|-?] -> Shows this help" |
---|
15 | echo " lliurex-upgrade [sai|--ignore-sources|--sai|-s] -> Update the system without checking sources.list" |
---|
16 | echo " lliurex-upgrade [no-update|--no-update|-n] -> Update the system without checking sources.list" |
---|
17 | } |
---|
18 | |
---|
19 | |
---|
20 | |
---|
21 | # Some sanity checks |
---|
22 | if [ "$(id -u)" != "0" ]; then |
---|
23 | echo "You must be root tu run this script, sorry" |
---|
24 | exit 0 |
---|
25 | fi |
---|
26 | |
---|
27 | |
---|
28 | # Some additional parameters to make additional actions without |
---|
29 | # losing compatibility |
---|
30 | |
---|
31 | # Capture parameters |
---|
32 | ACTION="$1" |
---|
33 | |
---|
34 | case $ACTION in |
---|
35 | |
---|
36 | info|--info) |
---|
37 | llxcfg-upgrade-version-scripts info |
---|
38 | exit 0 |
---|
39 | ;; |
---|
40 | help|--help|-h|-?) |
---|
41 | _usage |
---|
42 | exit 0 |
---|
43 | ;; |
---|
44 | sai|--ignore-sources|--sai|-s) |
---|
45 | export LLIUREX_UP_IGNORE_SOURCES="yes" |
---|
46 | ;; |
---|
47 | no-update|--no-update|-n) |
---|
48 | export LLIUREX_UP_NO_UPDATE="yes" |
---|
49 | ;; |
---|
50 | *) |
---|
51 | echo " [ LliureX Up ] The show must go on!" |
---|
52 | echo " [ LliureX UP ] Upgrade is always the default option" |
---|
53 | ;; |
---|
54 | |
---|
55 | esac |
---|
56 | |
---|
57 | # Do the upgrade |
---|
58 | llxcfg-upgrade-version-scripts migrate |
---|
59 | |
---|
60 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.