4 |
# some global includes |
# some global includes |
5 |
sminclude cleanutils mtools |
sminclude cleanutils mtools |
6 |
|
|
7 |
# all deprecated mage-targets |
# include alx functions |
8 |
DEPRECATED_MAGE_TARGETS="alx_dev alx_livecd alx" |
INHERITS="${INHERITS} alx" |
|
|
|
|
# variable to save pname |
|
|
_PNAME="${PNAME}" |
|
|
|
|
|
SPECIAL_VARS="${SPECIAL_VARS} DEPRECATED_MAGE_TARGETS REMOVE_DEPRECATED_MAGE_TARGETS _PNAME" |
|
|
SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} alx_postinstall" |
|
|
|
|
|
alx_postinstall() |
|
|
{ |
|
|
local target |
|
|
|
|
|
case ${REMOVE_DEPRECATED_MAGE_TARGETS} in |
|
|
1|yes|true|TRUE) |
|
|
for target in ${DEPRECATED_MAGE_TARGETS} |
|
|
do |
|
|
if [[ ! -z $(magequery -n ${_PNAME}-${target}) ]] |
|
|
then |
|
|
echo "removing deprecated mage-target '${_PNAME}-${target}'" |
|
|
mage uninstall ${_PNAME}-${target} || die |
|
|
fi |
|
|
done |
|
|
;; |
|
|
esac |
|
|
} |
|
9 |
|
|
10 |
# injects files to given path (defaults to /usr/bin) |
# injects files to given path (defaults to /usr/bin) |
11 |
# mcinjectfile file {/path/to/dest} |
# mcinjectfile file {/path/to/dest} |
141 |
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}" |
142 |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
source ${SMAGENAME%/*}/alx/${PNAME}.custom |
143 |
fi |
fi |
|
|
|
|
export_inherits alx postinstall |
|