mirror of
https://gitlab.manjaro.org/applications/manjaro-architect
synced 2024-11-08 01:10:26 +00:00
[util] add evaluate_profiles() and evaluate_openrc(); https://github.com/Chrysostomus/manjaro-architect/issues/64#issuecomment-282562848
This commit is contained in:
parent
b5c62a5a7f
commit
55eac1b0a4
24
lib/util.sh
24
lib/util.sh
@ -375,3 +375,27 @@ check_pkg() {
|
||||
check_for_error "install missing pkg $1 to target." $?
|
||||
fi
|
||||
}
|
||||
|
||||
# return list of profiles not containing >openrc flag in Packages-Desktop
|
||||
evaluate_profiles() {
|
||||
echo "" > /tmp/.systemd_only
|
||||
for p in $(find $PROFILES/{manjaro,community} -mindepth 1 -maxdepth 1 -type d ! -name 'netinstall' ! -name 'architect'); do
|
||||
[[ ! $(grep ">openrc" $p/Packages-Desktop) ]] && echo $p | cut -f7 -d'/' >> /tmp/.systemd_only
|
||||
done
|
||||
echo $(cat /tmp/.systemd_only)
|
||||
}
|
||||
|
||||
# verify if profile is available for openrc
|
||||
evaluate_openrc() {
|
||||
if [[ ! $(grep ">openrc" /tmp/.edition) ]]; then
|
||||
DIALOG "Wrong init system" --menu "Profile [$(cat /tmp/.desktop)] is currently not ready for openrc\nPlease adjust your selection:" 0 0 2 \
|
||||
"1" "Select different profile" \
|
||||
"2" "Install systemd base" 2>${ANSWER}
|
||||
case $(cat ${ANSWER}) in
|
||||
"1") install_desktop_menu
|
||||
;;
|
||||
"2") install_base
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user