util-iso-cal: make yaml file name a get function

This commit is contained in:
udeved 2016-08-20 22:56:27 +02:00
parent 1a8aa352a5
commit 09cf136d78

View file

@ -294,17 +294,24 @@ write_postcfg_conf(){
echo " - manjaro" >> "$conf"
}
write_netinstall_conf(){
local conf="$1/etc/calamares/modules/netinstall.conf"
get_yaml(){
local args=() ext="yaml" yaml
if ${unpackfs};then
local yaml="netinstall-hybrid.yaml"
[[ ${initsys} == 'openrc' ]] && yaml="netinstall-hybrid-${initsys}.yaml"
args+=("hybrid")
else
local yaml="netinstall.yaml"
[[ ${initsys} == 'openrc' ]] && yaml="netinstall-${initsys}.yaml"
args+=('netinstall')
fi
[[ ${initsys} == 'openrc' ]] && args+=("${initsys}")
[[ ${edition} == 'sonar' ]] && args+=("${edition}")
for arg in ${args[@]};do
yaml=${yaml:-}${yaml:+-}${arg}
done
echo "${yaml}.${ext}"
}
write_netinstall_conf(){
echo "---" > "$conf"
echo "groupsUrl: ${netgroups}/${yaml}" >> "$conf"
echo "groupsUrl: ${netgroups}/$(get_yaml)" >> "$conf"
}
write_grubcfg_conf(){