aur_builder/run.sh
Balakrishnan Balasubramanian 1d46cde88b Cleanup
1. Save output along with log inside output directory
2. Remove wip yay support
2025-03-27 13:56:35 -04:00

34 lines
724 B
Bash
Executable File

#!/bin/bash
set -xeuo pipefail
# /etc/hosts is managed by podman. Copying or editing with `sed -i` does not seem to work. Only appendig works
# podman sets up 169.254.1.2 to be the ip of the host
sudo sh -c 'echo "169.254.1.2 archmirror.i.balki.me" >> /etc/hosts'
sudo sh -c 'echo "169.254.1.2 gitea.balki.me" >> /etc/hosts'
sudo pacman -Syu
mkdir output
cp -r /w .
cd ./w
if [ "${DEBUG_SHELL-n}" = y ]; then
echo "Stopping before build... Run 'exit 1' to skip building"
tail -12 "$0"
bash
fi
if [ -d deps ]; then
sudo pacman -U deps/*pkg.tar*
fi
LOGDEST=../output PKGDEST=../output makepkg --syncdeps --log
sudo cp -r ../output /w
if [ "${DEBUG_SHELL-n}" = y ]; then
echo "Build complete"
bash
fi