source: lliurex-up/trunk/fuentes/lliurex-up-core/usr/share/lliurex-up/commonScripts/update-cache @ 2993

Last change on this file since 2993 was 2993, checked in by kbut, 3 years ago

add lliurex-up-core folder

File size: 651 bytes
Line 
1#!/bin/sh
2# Update cache
3
4# gettext domain
5TEXTDOMAIN="lliurex-up"
6export TEXTDOMAIN
7
8COMMON_LIBRARY="/usr/share/lliurex-up/common-upgrade-vars.sh"
9if [  -r $COMMON_LIBRARY  ] ; then 
10        . $COMMON_LIBRARY
11fi
12
13#gettext messages
14INFO_MESSAGE="$(gettext "Update software cache")"
15
16# Methods
17_info()
18{
19        echo "$INFO_MESSAGE"
20}
21
22_migrate()
23{
24        echo "$INFO_MESSAGE"
25        if [ "${LLIUREX_UP_NO_UPDATE}" = "yes" ] ; then
26            echo "NO $INFO_MESSAGE"
27        else
28            apt-get update
29        fi
30}
31
32_usage()
33{
34        echo "# Unknown argument"
35
36}
37
38_die()
39{
40        echo "Error: $1"
41        exit 1
42}
43
44ACTION="$1"
45case "$ACTION" in
46        migrate)
47                _migrate
48        ;;
49        info)
50                _info
51        ;;
52        *)
53                _usage
54        ;;
55esac
56
57exit 0
Note: See TracBrowser for help on using the repository browser.