forked from mirrored-repos/manjaro-tools
Add init profiles repo functions
This commit is contained in:
parent
bbd9aaba24
commit
467a57b122
2 changed files with 27 additions and 6 deletions
|
@ -9,14 +9,13 @@
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
version=@version@
|
version=0.15.9
|
||||||
|
|
||||||
LIBDIR='@libdir@'
|
LIBDIR='/usr/lib/manjaro-tools'
|
||||||
DATADIR='@datadir@'
|
DATADIR='/usr/share/manjaro-tools'
|
||||||
SYSCONFDIR='@sysconfdir@'
|
SYSCONFDIR='/etc/manjaro-tools'
|
||||||
|
|
||||||
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
|
[[ -r ${LIBDIR}/util-msg.sh ]] && source ${LIBDIR}/util-msg.sh
|
||||||
|
|
||||||
import ${LIBDIR}/util.sh
|
import ${LIBDIR}/util.sh
|
||||||
|
|
||||||
show_profile(){
|
show_profile(){
|
||||||
|
@ -56,6 +55,7 @@ display_settings(){
|
||||||
show_config
|
show_config
|
||||||
|
|
||||||
msg "PROFILE:"
|
msg "PROFILE:"
|
||||||
|
msg2 "gitlab brach: %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}"
|
||||||
|
@ -89,6 +89,8 @@ load_user_info
|
||||||
|
|
||||||
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
load_config "${USERCONFDIR}/manjaro-tools.conf" || load_config "${SYSCONFDIR}/manjaro-tools.conf"
|
||||||
|
|
||||||
|
init_profiles
|
||||||
|
|
||||||
# to force old way to have buildiso run in iso-profiles dir
|
# to force old way to have buildiso run in iso-profiles dir
|
||||||
# run_dir=$(pwd)
|
# run_dir=$(pwd)
|
||||||
|
|
||||||
|
|
21
lib/util.sh
21
lib/util.sh
|
@ -317,6 +317,8 @@ init_buildiso(){
|
||||||
|
|
||||||
[[ -z ${kernel} ]] && kernel="linux414"
|
[[ -z ${kernel} ]] && kernel="linux414"
|
||||||
|
|
||||||
|
[[ -z ${branch} ]] && branch="v17.1" #current branch release
|
||||||
|
|
||||||
[[ -z ${gpgkey} ]] && gpgkey=''
|
[[ -z ${gpgkey} ]] && gpgkey=''
|
||||||
|
|
||||||
mhwd_repo="/opt/pkg"
|
mhwd_repo="/opt/pkg"
|
||||||
|
@ -386,7 +388,7 @@ load_profile_config(){
|
||||||
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
|
[[ -z ${login_shell} ]] && login_shell='/bin/bash'
|
||||||
|
|
||||||
if [[ -z ${addgroups} ]]; then
|
if [[ -z ${addgroups} ]]; then
|
||||||
addgroups="audio,disk,lp,network,optical,power,scanner,storage,video,wheel"
|
addgroups="lp,network,power,sys,wheel"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z ${enable_systemd[@]} ]]; then
|
if [[ -z ${enable_systemd[@]} ]]; then
|
||||||
|
@ -764,3 +766,20 @@ create_chksums() {
|
||||||
sha1sum $1 > $1.sha1
|
sha1sum $1 > $1.sha1
|
||||||
sha256sum $1 > $1.sha256
|
sha256sum $1 > $1.sha256
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init_profiles() {
|
||||||
|
_workdir='/usr/share/manjaro-tools'
|
||||||
|
if [[ -d ${_workdir}/iso-profiles ]]; then
|
||||||
|
rm -Rf ${_workdir}/iso-profiles ]]
|
||||||
|
fi
|
||||||
|
git clone -q --depth 1 -b ${branch} https://gitlab.manjaro.org/profiles-and-settings/iso-profiles.git ${_workdir}/iso-profiles/
|
||||||
|
|
||||||
|
for i in ${_workdir}/iso-profiles/.gitignore ${_workdir}/iso-profiles/README.md; do
|
||||||
|
rm -f $i
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in ${_workdir}/iso-profiles/.git ${_workdir}/iso-profiles/sonar; do
|
||||||
|
rm -Rf $i
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue