appmenus: handle multiple releases common menus

This commit is contained in:
fepitre 2018-08-17 22:07:33 +02:00 committed by Frédéric Pierret
parent 0a77671d21
commit 8b6f0e0e1f
No known key found for this signature in database
GPG Key ID: 1DABC232BE02201E

View File

@ -94,8 +94,12 @@ _appmenus_dir="${APPMENUS_DIR:-${SCRIPTSDIR}}"
rm -f appmenus rm -f appmenus
if [ -d "${_appmenus_dir}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then if [ -d "${_appmenus_dir}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then
ln -s "${_appmenus_dir}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus ln -s "${_appmenus_dir}/appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus
elif [ -d "${_appmenus_dir}/appmenus_${DIST//[0-9]*}_${TEMPLATE_FLAVOR}" ]; then
ln -s "${_appmenus_dir}/appmenus_${DIST//[0-9]*}_${TEMPLATE_FLAVOR}" appmenus
elif [ -d "${_appmenus_dir}/appmenus_$DIST" ]; then elif [ -d "${_appmenus_dir}/appmenus_$DIST" ]; then
ln -s "${_appmenus_dir}/appmenus_$DIST" appmenus ln -s "${_appmenus_dir}/appmenus_$DIST" appmenus
elif [ -d "${_appmenus_dir}/appmenus_${DIST//[0-9]*}" ]; then
ln -s "${_appmenus_dir}/appmenus_${DIST//[0-9]*}" appmenus
elif [ -d "${_appmenus_dir}/appmenus" ]; then elif [ -d "${_appmenus_dir}/appmenus" ]; then
ln -s "${_appmenus_dir}/appmenus" appmenus ln -s "${_appmenus_dir}/appmenus" appmenus
else else