7 |
# all deprecated mage-targets |
# all deprecated mage-targets |
8 |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
9 |
|
|
10 |
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS ALX_REMOVE_DEPRECATED_MAGE_TARGETS" |
# variable to save pname |
11 |
|
_PNAME="${PNAME}" |
12 |
|
|
13 |
|
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS _PNAME" |
14 |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
15 |
|
|
16 |
alx_postinstall() |
alx_postinstall() |
17 |
{ |
{ |
18 |
local target |
local target |
19 |
|
|
20 |
case ${ALX_REMOVE_DEPRECATED_MAGE_TARGETS} in |
case ${REMOVE_DEPRECATED_MAGE_TARGETS} in |
21 |
1|yes|true|TRUE) |
1|yes|true|TRUE) |
22 |
for target in ${DEPRECATED_MAGE_TARGETS} |
for target in ${DEPRECATED_MAGE_TARGETS} |
23 |
do |
do |
24 |
if [[ ! -z $(magequery -n ${PNAME}-${target}) ]] |
if [[ ! -z $(magequery -n ${_PNAME}-${target}) ]] |
25 |
then |
then |
26 |
echo "removing deprecated mage-target '${PNAME}-${target}'" |
echo "removing deprecated mage-target '${_PNAME}-${target}'" |
27 |
mage uninstall ${PNAME}-${target} || die |
mage uninstall ${_PNAME}-${target} || die |
28 |
fi |
fi |
29 |
done |
done |
30 |
;; |
;; |
165 |
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}" |
166 |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
167 |
fi |
fi |
168 |
|
|
169 |
|
export_inherits alx postinstall |