little fixes and changes
This commit is contained in:
parent
9922d521a8
commit
630f4871ae
2 changed files with 11 additions and 11 deletions
|
@ -35,12 +35,12 @@ run(){
|
||||||
chroot_init
|
chroot_init
|
||||||
prepare_dir "${pkgdir}"
|
prepare_dir "${pkgdir}"
|
||||||
chroot_build
|
chroot_build
|
||||||
ch_owner "$(dirname $(dirname ${pkgdir}))"
|
ch_owner "$(dirname ${pkgdir})"
|
||||||
if ${repo}; then
|
if ${repo}; then
|
||||||
prepare_dir "${repodir}"
|
prepare_dir "${repodir}"
|
||||||
repo_create
|
repo_create
|
||||||
|
ch_owner "$(dirname ${repodir})"
|
||||||
fi
|
fi
|
||||||
ch_owner "${repodir}"
|
|
||||||
if ${sign}; then
|
if ${sign}; then
|
||||||
sign_pkgs
|
sign_pkgs
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -12,17 +12,18 @@
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
mv_pkg(){
|
mv_pkg(){
|
||||||
msg2 "Moving $1 to ${pkgdir}"
|
msg2 "Moving [$1] to [${pkgdir}]"
|
||||||
local ext='pkg.tar.xz'
|
local ext='pkg.tar.xz'
|
||||||
mv *.${ext} ${pkgdir}/
|
mv *.${ext} ${pkgdir}/
|
||||||
}
|
}
|
||||||
|
|
||||||
ch_owner(){
|
ch_owner(){
|
||||||
|
msg "chown -R [$(get_user):users] [$1]"
|
||||||
chown -R "$(get_user):users" "$1"
|
chown -R "$(get_user):users" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
repo_create(){
|
repo_create(){
|
||||||
msg "Creating repo ${repodir} ..."
|
msg "Creating repo [${repodir}] ..."
|
||||||
local ext='pkg.tar.xz'
|
local ext='pkg.tar.xz'
|
||||||
for pkg in ${pkgdir}/*.${ext}; do
|
for pkg in ${pkgdir}/*.${ext}; do
|
||||||
cp $pkg ${repodir}/
|
cp $pkg ${repodir}/
|
||||||
|
@ -30,7 +31,6 @@ repo_create(){
|
||||||
cd ${repodir}
|
cd ${repodir}
|
||||||
local parent=$(dirname ${repodir})
|
local parent=$(dirname ${repodir})
|
||||||
repo-add ${repodir}/${parent##*/}.db.tar.xz *.${ext}
|
repo-add ${repodir}/${parent##*/}.db.tar.xz *.${ext}
|
||||||
msg "Done repo ${repodir}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sign_pkgs(){
|
sign_pkgs(){
|
||||||
|
@ -83,7 +83,7 @@ chroot_clean(){
|
||||||
|
|
||||||
clean_dir(){
|
clean_dir(){
|
||||||
msg2 "Cleaning $1 ..."
|
msg2 "Cleaning $1 ..."
|
||||||
rm $1/*
|
rm -r $1/*
|
||||||
}
|
}
|
||||||
|
|
||||||
git_clean(){
|
git_clean(){
|
||||||
|
@ -93,12 +93,12 @@ git_clean(){
|
||||||
|
|
||||||
chroot_create(){
|
chroot_create(){
|
||||||
mkdir -p "${chrootdir}"
|
mkdir -p "${chrootdir}"
|
||||||
setarch ${arch} \
|
setarch "${arch}" \
|
||||||
mkchroot ${mkchroot_args[*]} ${chrootdir}/root ${base_packages[*]} || abort
|
mkchroot ${mkchroot_args[*]} ${chrootdir}/root ${base_packages[*]} || abort
|
||||||
}
|
}
|
||||||
|
|
||||||
chroot_update(){
|
chroot_update(){
|
||||||
setarch ${arch} \
|
setarch "${arch}" \
|
||||||
mkchroot ${mkchroot_args[*]} -u ${chrootdir}/$(get_user) || abort
|
mkchroot ${mkchroot_args[*]} -u ${chrootdir}/$(get_user) || abort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,12 +132,12 @@ chroot_build(){
|
||||||
msg "Start building profile: [${profile}]"
|
msg "Start building profile: [${profile}]"
|
||||||
for pkg in $(cat ${profiledir}/${profile}.set); do
|
for pkg in $(cat ${profiledir}/${profile}.set); do
|
||||||
cd $pkg
|
cd $pkg
|
||||||
setarch ${arch} \
|
setarch "${arch}" \
|
||||||
mkchrootpkg ${mkchrootpkg_args[*]} -- "${makepkg_args[*]}" || break
|
mkchrootpkg ${mkchrootpkg_args[*]} -- "${makepkg_args[*]}" || break
|
||||||
if [[ $pkg == 'eudev' ]]; then
|
if [[ $pkg == 'eudev' ]]; then
|
||||||
local blacklist=('libsystemd') temp=
|
local blacklist=('libsystemd') temp=
|
||||||
pacman -Rdd "${blacklist[@]}" -r ${chrootdir}/$(get_user) --noconfirm
|
pacman -Rdd "${blacklist[@]}" -r ${chrootdir}/$(get_user) --noconfirm
|
||||||
pacman -U *pkg*z -r ${chrootdir}/$(get_user) --noconfirm
|
setarch "${arch}" pacman -U *pkg*z -r ${chrootdir}/$(get_user) --noconfirm
|
||||||
fi
|
fi
|
||||||
mv_pkg "${pkg}"
|
mv_pkg "${pkg}"
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -145,7 +145,7 @@ chroot_build(){
|
||||||
msg "Finished building profile: [${profile}]"
|
msg "Finished building profile: [${profile}]"
|
||||||
else
|
else
|
||||||
cd ${profile}
|
cd ${profile}
|
||||||
setarch ${arch} \
|
setarch "${arch}" \
|
||||||
mkchrootpkg ${mkchrootpkg_args[*]} -- "${makepkg_args[*]}" || abort
|
mkchrootpkg ${mkchrootpkg_args[*]} -- "${makepkg_args[*]}" || abort
|
||||||
mv_pkg "${profile}"
|
mv_pkg "${profile}"
|
||||||
cd ..
|
cd ..
|
||||||
|
|
Loading…
Reference in a new issue