repo: verbosity

This commit is contained in:
Thomas Hobson 2021-03-14 13:21:06 +13:00
parent 71d675f454
commit 22e32be05b
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
2 changed files with 27 additions and 4 deletions

View file

@ -1,14 +1,38 @@
cd /piston/packages
SERVER=1
BUILD=1
echo "Running through arguments.."
for pkg in "$@"
do
[[ "$pkg" = "--no-server" ]] && SERVER=0 || make -j16 $pkg.pkg.tar.gz
if [[ "$pkg" = "--no-server" ]]; then
echo "Not starting index server after builds"
SERVER=0
elif [[ "$pkg" = "--no-build" ]]; then
echo "Building no more package"
BUILD=0
else
if [[ $BUILD -eq 1 ]]; then
echo "Building package $pkg"
make -j16 $pkg.pkg.tar.gz
echo "Done with package $pkg"
else
echo "Building was disabled, skipping $pkg"
fi
fi
done
cd /piston/repo
echo "Creating index"
./mkindex.sh
echo "Index created"
[[ $SERVER -eq 1 ]] && python3 -m http.server
if [[ $SERVER -eq 1 ]]; then
echo "Starting index server.."
python3 -m http.server
else
echo "Skipping starting index server"
fi
exit 0