forked from mirrored-repos/manjaro-tools
[util] add functions to load a set used to evaualte the edition(official/community/community-openrc)
This commit is contained in:
parent
569f2e8b8f
commit
18c66b35f2
1 changed files with 30 additions and 2 deletions
32
lib/util.sh
32
lib/util.sh
|
@ -389,9 +389,9 @@ init_buildiso(){
|
|||
|
||||
init_deployiso(){
|
||||
|
||||
[[ -z ${remote_target} ]] && remote_target="${dist_release}"
|
||||
[[ -z ${remote_target} ]] && remote_target="/home/frs/project"
|
||||
|
||||
[[ -z ${remote_project} ]] && remote_project="manjaro"
|
||||
[[ -z ${remote_project} ]] && remote_project="manjaro-testing"
|
||||
|
||||
[[ -z ${remote_user} ]] && remote_user="Please set your user!"
|
||||
|
||||
|
@ -511,6 +511,34 @@ load_sets(){
|
|||
echo $prof
|
||||
}
|
||||
|
||||
load_set(){
|
||||
local profs
|
||||
for item in $(cat ${sets_dir_iso}/$1.set);do
|
||||
profs=${profs:-}${profs:+|}${item}
|
||||
done
|
||||
echo $profs
|
||||
}
|
||||
|
||||
eval_edition(){
|
||||
eval "case $1 in
|
||||
$(load_set 'official'))
|
||||
iso_edition='official'
|
||||
;;
|
||||
$(load_set 'community'))
|
||||
iso_edition='community'
|
||||
;;
|
||||
$(load_set 'official-minimal'))
|
||||
iso_edition='official-minimal'
|
||||
;;
|
||||
$(load_set 'community-minimal'))
|
||||
iso_edition='community-minimal'
|
||||
;;
|
||||
$(load_set 'community-openrc'))
|
||||
iso_edition='community-openrc'
|
||||
;;
|
||||
esac"
|
||||
}
|
||||
|
||||
# $1: buildset
|
||||
# $2: sets_dir
|
||||
eval_buildset(){
|
||||
|
|
Loading…
Reference in a new issue