Skip to content

Commit

Permalink
add external repo to setup on a new build
Browse files Browse the repository at this point in the history
fixes, #70
  • Loading branch information
graysky2 committed Apr 10, 2021
1 parent 21e8823 commit 0358c90
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions common/clean-chroot-manager64.in
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ preview() {
BR_THREADS=$(grep MAKEFLAGS= "$CUSTOM_MAKEPKG_CONF")
THREADS="${BR_THREADS//[^0-9]/}"
fi

if [[ -d "$REPO" ]]; then
if ! find "$REPO" -maxdepth 0 -type d -empty |grep -q .; then
REPOSIZE="${BOLD}$(du -sh "$REPO" 2>/dev/null|awk '{ print $1 }')${ALL_OFF}"
Expand Down Expand Up @@ -604,7 +604,17 @@ case "$1" in
if [[ ! -f "$CHROOTPATH64"/root/.arch-chroot ]]; then
mesg="No buildroot has been created so making one now..."
echo -e "${YELLOW}---->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}"
create
create && check_external

# if using an external repo, we need to add it to pacman.conf assuming that
# the user wants to use these packages
if ! grep -q "$REPO_NAME" "$CHROOTPATH64/root/etc/pacman.conf"; then
# add a local repo to buildroot
sed -i "/\[testing\]/i \
# Added by clean-chroot-manager\n[$REPO_NAME]\nSigLevel = Never\nServer = file://$REPO\n" \
"$CHROOTPATH64/root/etc/pacman.conf"
fi

fi

mesg="Attempting to build package..."
Expand Down

0 comments on commit 0358c90

Please sign in to comment.