4 |
# some global includes |
# some global includes |
5 |
sminclude cleanutils mtools |
sminclude cleanutils mtools |
6 |
|
|
7 |
|
# include alx functions |
8 |
|
INHERIT="alx" |
9 |
|
|
10 |
# all deprecated mage-targets |
# all deprecated mage-targets |
11 |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
12 |
|
|
13 |
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS ALX_REMOVE_DEPRECATED_MAGE_TARGETS" |
# variable to save pname |
14 |
|
_PNAME="${PNAME}" |
15 |
|
|
16 |
|
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS _PNAME" |
17 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
18 |
|
|
19 |
alx_postinstall() |
alx_postinstall() |
20 |
{ |
{ |
21 |
local target |
local target |
22 |
|
|
23 |
case ${ALX_REMOVE_DEPRECATED_MAGE_TARGETS} in |
case ${REMOVE_DEPRECATED_MAGE_TARGETS} in |
24 |
1|yes|true|TRUE) |
1|yes|true|TRUE) |
25 |
for target in ${DEPRECATED_MAGE_TARGETS} |
for target in ${DEPRECATED_MAGE_TARGETS} |
26 |
do |
do |
27 |
if [[ ! -z $(magequery -n ${PNAME}-${target}) ]] |
if [[ ! -z $(magequery -n ${_PNAME}-${target}) ]] |
28 |
then |
then |
29 |
echo "removing deprecated mage-target '${PNAME}-${target}'" |
echo "removing deprecated mage-target '${_PNAME}-${target}'" |
30 |
mage uninstall ${PNAME}-${target} || die |
mage uninstall ${_PNAME}-${target} || die |
31 |
fi |
fi |
32 |
done |
done |
33 |
;; |
;; |
168 |
echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}" |
echo -e "${COLBLUE}*** ${COLGREEN}Using custom build info from ${SMAGENAME%/*}/alx/${PNAME}.custom${COLDEFAULT}" |
169 |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
170 |
fi |
fi |
171 |
|
|
172 |
|
export_inherits alx postinstall |