Compare commits

...

4 Commits

2 changed files with 21 additions and 3 deletions

View File

@@ -78,7 +78,7 @@ from_arch(){
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg" [[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
local package=${TREE_DIR_ARCH}/$git_tree_arch/$pkg local package=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
local repo=$(find_repo "$package") local repo=$(find_repo "$package" "${staging}" "${unstable}")
src=$package/repos/$repo src=$package/repos/$repo
@@ -114,7 +114,7 @@ view_build(){
[[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg" [[ -z $git_tree_arch ]] && die "Package '%s' does not exist!" "$pkg"
local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$pkg local pkg_path=${TREE_DIR_ARCH}/$git_tree_arch/$pkg
local repo=$(find_repo "$pkg_path") local repo=$(find_repo "$pkg_path" "${staging}" "${unstable}")
src=$pkg_path/repos/$repo src=$pkg_path/repos/$repo
@@ -139,6 +139,8 @@ import=false
view=false view=false
createnew=false createnew=false
conf=false conf=false
unstable=false
staging=true
PACKAGE='' PACKAGE=''
@@ -157,6 +159,8 @@ usage() {
echo " -y Don't clone or pull artix repos" echo " -y Don't clone or pull artix repos"
echo ' -i Import a package from arch repos' echo ' -i Import a package from arch repos'
echo ' -n Make new remote subrepo and clone it' echo ' -n Make new remote subrepo and clone it'
echo ' -u Include kde & gnome unstable (only with -i)'
echo ' -w Exclude staging (only with -i)'
echo ' -v View package depends' echo ' -v View package depends'
echo ' -h This help' echo ' -h This help'
echo '' echo ''
@@ -166,7 +170,7 @@ usage() {
orig_argv=("$0" "$@") orig_argv=("$0" "$@")
opts='p:t:g:sinzyvh' opts='p:t:g:uwsinzyvh'
while getopts "${opts}" arg; do while getopts "${opts}" arg; do
case "${arg}" in case "${arg}" in
@@ -178,6 +182,8 @@ while getopts "${opts}" arg; do
y) sync_artix=false ;; y) sync_artix=false ;;
i) import=true ;; i) import=true ;;
n) createnew=true ;; n) createnew=true ;;
w) staging=false ;;
u) unstable=true ;;
v) view=true ;; v) view=true ;;
h|?) usage 0 ;; h|?) usage 0 ;;
*) echo "invalid argument '${arg}'"; usage 1 ;; *) echo "invalid argument '${arg}'"; usage 1 ;;

View File

@@ -136,12 +136,24 @@ write_servicescfg_conf(){
printf '%s' "${yaml}" printf '%s' "${yaml}"
} }
write_unpackfs_conf(){
local yaml=$(write_yaml_header)
yaml+=$(write_empty_line)
yaml+=$(write_yaml_map 0 'unpack')
yaml+=$(write_yaml_seq_map 2 'source' "/run/artix/bootmnt/artix/x86_64/rootfs.sfs")
yaml+=$(write_yaml_map 4 'sourcefs' 'squashfs')
yaml+=$(write_yaml_map 4 'destination' '')
yaml+=$(write_empty_line)
printf '%s' "${yaml}"
}
configure_calamares(){ configure_calamares(){
local mods="$1/etc/calamares/modules" local mods="$1/etc/calamares/modules"
if [[ -d "$mods" ]];then if [[ -d "$mods" ]];then
msg2 "Configuring Calamares" msg2 "Configuring Calamares"
write_users_conf > "$mods"/users.conf write_users_conf > "$mods"/users.conf
write_servicescfg_conf > "$mods"/services-"${INITSYS}".conf write_servicescfg_conf > "$mods"/services-"${INITSYS}".conf
[[ -z ${DESKTOP_LIST} ]] && write_unpackfs_conf > "$mods"/unpackfs.conf
sed -e "s|openrc|${INITSYS}|" -i "$mods"/postcfg.conf sed -e "s|openrc|${INITSYS}|" -i "$mods"/postcfg.conf
sed -e "s|services-openrc|services-${INITSYS}|" -i "$1"/etc/calamares/settings.conf sed -e "s|services-openrc|services-${INITSYS}|" -i "$1"/etc/calamares/settings.conf
fi fi