forked from mirrored-repos/manjaro-tools
Merge branch 'master' of ssh://gitlab.manjaro.org:22277/tools/development-tools/manjaro-tools
This commit is contained in:
commit
65c1322551
6 changed files with 54 additions and 30 deletions
|
@ -242,6 +242,7 @@ Usage: buildiso [options]
|
||||||
[default: linux49]
|
[default: linux49]
|
||||||
-l Create permalink
|
-l Create permalink
|
||||||
-m Set SquashFS image mode to persistence
|
-m Set SquashFS image mode to persistence
|
||||||
|
-o Enable office installer
|
||||||
-p <profile> Buildset or profile [default: default]
|
-p <profile> Buildset or profile [default: default]
|
||||||
-q Query settings and pretend build
|
-q Query settings and pretend build
|
||||||
-r <dir> Chroots directory
|
-r <dir> Chroots directory
|
||||||
|
|
|
@ -29,6 +29,7 @@ show_profile(){
|
||||||
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
[[ ${target_arch} == 'x86_64' ]] && msg2 "multilib: %s" "${multilib}"
|
||||||
|
|
||||||
msg2 "extra: %s" "${extra}"
|
msg2 "extra: %s" "${extra}"
|
||||||
|
msg2 "office_installer: %s" "${office_installer}"
|
||||||
msg2 "permalink: %s" "${permalink}"
|
msg2 "permalink: %s" "${permalink}"
|
||||||
|
|
||||||
msg2 "netinstall: %s" "${netinstall}"
|
msg2 "netinstall: %s" "${netinstall}"
|
||||||
|
@ -63,7 +64,7 @@ display_settings(){
|
||||||
show_config
|
show_config
|
||||||
|
|
||||||
msg "PROFILE:"
|
msg "PROFILE:"
|
||||||
msg2 "gitlab brach: %s" "${branch}"
|
msg2 "gitlab branch: %s" "${branch}"
|
||||||
msg2 "build_lists: %s" "$(show_build_lists ${list_dir_iso})"
|
msg2 "build_lists: %s" "$(show_build_lists ${list_dir_iso})"
|
||||||
msg2 "build_list_iso: %s" "${build_list_iso}"
|
msg2 "build_list_iso: %s" "${build_list_iso}"
|
||||||
msg2 "is_build_list: %s" "${is_build_list}"
|
msg2 "is_build_list: %s" "${is_build_list}"
|
||||||
|
@ -81,6 +82,7 @@ display_settings(){
|
||||||
msg2 "persist: %s" "${persist}"
|
msg2 "persist: %s" "${persist}"
|
||||||
msg2 "extra: %s" "${full_iso}"
|
msg2 "extra: %s" "${full_iso}"
|
||||||
msg2 "permalink: %s" "${permalink}"
|
msg2 "permalink: %s" "${permalink}"
|
||||||
|
msg2 "office_installer: %s" "${office_installer}"
|
||||||
|
|
||||||
msg "DIST SETTINGS:"
|
msg "DIST SETTINGS:"
|
||||||
msg2 "dist_name: %s" "${dist_name}"
|
msg2 "dist_name: %s" "${dist_name}"
|
||||||
|
@ -128,6 +130,7 @@ usage() {
|
||||||
echo ' -l Create permalink'
|
echo ' -l Create permalink'
|
||||||
echo ' -m Set SquashFS image mode to persistence'
|
echo ' -m Set SquashFS image mode to persistence'
|
||||||
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
|
echo " -p <profile> Buildset or profile [default: ${build_list_iso}]"
|
||||||
|
echo ' -o Enable office installer module'
|
||||||
echo ' -q Query settings and pretend build'
|
echo ' -q Query settings and pretend build'
|
||||||
echo ' -r <dir> Chroots directory'
|
echo ' -r <dir> Chroots directory'
|
||||||
echo " [default: ${chroots_iso}]"
|
echo " [default: ${chroots_iso}]"
|
||||||
|
@ -145,7 +148,7 @@ usage() {
|
||||||
|
|
||||||
orig_argv=("$@")
|
orig_argv=("$@")
|
||||||
|
|
||||||
opts='p:a:b:r:t:k:g:d:cfzxmvqhil'
|
opts='p:a:b:r:t:k:g:d:cfzxmvqhilo'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
|
@ -166,6 +169,7 @@ while getopts "${opts}" arg; do
|
||||||
x) images_only=true ;;
|
x) images_only=true ;;
|
||||||
z) iso_only=true ;;
|
z) iso_only=true ;;
|
||||||
l) permalink=true ;;
|
l) permalink=true ;;
|
||||||
|
o) office_installer=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
*) echo "invalid argument '${arg}'"; usage 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -10,6 +10,10 @@ Branch = stable
|
||||||
## 2) random - randomly generate the output mirrorlist
|
## 2) random - randomly generate the output mirrorlist
|
||||||
# Method = rank
|
# Method = rank
|
||||||
|
|
||||||
|
## Filename to use when ranking mirrors
|
||||||
|
## The file must be present in core repo
|
||||||
|
# TestFile = core.db.tar.gz
|
||||||
|
|
||||||
## Define protocols and priority
|
## Define protocols and priority
|
||||||
## separated by comma 'https,http' or 'http,https'
|
## separated by comma 'https,http' or 'http,https'
|
||||||
## ATM available protocols are: http, https, ftp
|
## ATM available protocols are: http, https, ftp
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
# use extra packages as defined in pkglist to activate a full profile
|
# use extra packages as defined in pkglist to activate a full profile
|
||||||
# extra="false"
|
# extra="false"
|
||||||
|
|
||||||
|
# use office installer module
|
||||||
|
# office_installer="false"
|
||||||
|
|
||||||
################ install ################
|
################ install ################
|
||||||
|
|
||||||
# default displaymanager: none
|
# default displaymanager: none
|
||||||
|
|
|
@ -294,15 +294,15 @@ write_settings_conf(){
|
||||||
else
|
else
|
||||||
echo " - users" >> "$conf" && write_users_conf
|
echo " - users" >> "$conf" && write_users_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# WIP - OfficeChooser
|
# WIP - OfficeChooser
|
||||||
if ${extra}; then
|
if ${oem_used} || ! ${office_installer}; then
|
||||||
if ${oem_used}; then
|
msg2 "Skipping enabling PackageChooser module."
|
||||||
msg2 "Skipping enabling PackageChooser module."
|
else
|
||||||
else
|
msg2 "Enabling PackageChooser module."
|
||||||
msg2 "Enabling PackageChooser module."
|
echo " - packagechooser" >> "$conf"
|
||||||
echo " - packagechooser" >> "$conf"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ${netinstall}; then
|
if ${netinstall}; then
|
||||||
echo " - netinstall" >> "$conf" && write_netinstall_conf
|
echo " - netinstall" >> "$conf" && write_netinstall_conf
|
||||||
fi
|
fi
|
||||||
|
|
54
lib/util.sh
54
lib/util.sh
|
@ -460,6 +460,8 @@ load_profile_config(){
|
||||||
basic='true'
|
basic='true'
|
||||||
[[ ${extra} == 'true' ]] && basic='false'
|
[[ ${extra} == 'true' ]] && basic='false'
|
||||||
|
|
||||||
|
[[ -z ${office_installer} ]] && office_installer="false"
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,6 +508,7 @@ reset_profile(){
|
||||||
unset geoip
|
unset geoip
|
||||||
unset extra
|
unset extra
|
||||||
unset full_iso
|
unset full_iso
|
||||||
|
unset office_installer
|
||||||
}
|
}
|
||||||
|
|
||||||
check_profile(){
|
check_profile(){
|
||||||
|
@ -608,7 +611,7 @@ load_pkgs(){
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# We can reuse this code
|
# We can reuse this code
|
||||||
local _edition _edition_rm
|
local _edition _edition_rm
|
||||||
case "${edition}" in
|
case "${edition}" in
|
||||||
|
@ -622,6 +625,13 @@ load_pkgs(){
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
local _office _office_rm
|
||||||
|
if ${office_installer}; then
|
||||||
|
_office="s|>office||g"
|
||||||
|
else
|
||||||
|
_office_rm="s|>office.*||g"
|
||||||
|
fi
|
||||||
|
|
||||||
local _blacklist="s|>blacklist.*||g" \
|
local _blacklist="s|>blacklist.*||g" \
|
||||||
_kernel="s|KERNEL|$kernel|g" \
|
_kernel="s|KERNEL|$kernel|g" \
|
||||||
_used_kernel=${kernel:5:2} \
|
_used_kernel=${kernel:5:2} \
|
||||||
|
@ -649,6 +659,8 @@ load_pkgs(){
|
||||||
| sed "$_basic_rm" \
|
| sed "$_basic_rm" \
|
||||||
| sed "$_extra" \
|
| sed "$_extra" \
|
||||||
| sed "$_extra_rm" \
|
| sed "$_extra_rm" \
|
||||||
|
| sed "$_office" \
|
||||||
|
| sed "$_office_rm" \
|
||||||
| sed "$_clean")
|
| sed "$_clean")
|
||||||
|
|
||||||
if [[ $1 == "${packages_mhwd}" ]]; then
|
if [[ $1 == "${packages_mhwd}" ]]; then
|
||||||
|
@ -812,25 +824,25 @@ create_chksums() {
|
||||||
sha256sum $1 > $1.sha256
|
sha256sum $1 > $1.sha256
|
||||||
}
|
}
|
||||||
|
|
||||||
init_profiles() {
|
init_profiles() {
|
||||||
_workdir='/usr/share/manjaro-tools'
|
_workdir='/usr/share/manjaro-tools'
|
||||||
if [[ -d ${_workdir}/iso-profiles ]]; then
|
if [[ -d ${_workdir}/iso-profiles ]]; then
|
||||||
rm -Rf ${_workdir}/iso-profiles ]]
|
rm -Rf ${_workdir}/iso-profiles ]]
|
||||||
fi
|
fi
|
||||||
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
|
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
|
||||||
|
|
||||||
#Check if git clone is done
|
#Check if git clone is done
|
||||||
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
|
if [[ -d ${_workdir}/iso-profiles/manjaro ]] && [[ -d ${_workdir}/iso-profiles/community ]]; then
|
||||||
|
|
||||||
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
|
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
|
||||||
rm -f $i
|
rm -f $i
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
|
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
|
||||||
rm -Rf $i
|
rm -Rf $i
|
||||||
done
|
done
|
||||||
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
|
else msg2 "Impossible to initialize iso-profiles, please check internet connection or browse at 'https://gitlab.manjaro.org/profiles-and-settings/iso-profiles'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue