PKGBUILDs/scripts/recursive-builder

56 lines
1.5 KiB
Text
Raw Normal View History

2010-02-18 12:51:45 +00:00
#!/bin/sh
#
# Plugbox Linux Repository Builder
# By IanJB and mikestaszel, with hopefully easy-to-read comments
# Licensed under the GPLv2
#
# ==== README ====
# Put the name of the repository after the command, eg.
# ./recursive-builder extra
#
# For reference, $1 is the name of the repository you want built
# Packages built will be placed whereever you set makepkg.conf to put them.
# Make sure to set the settings below before running this script!
# ==== SETTINGS ====
# Set me to the root of your ABS repository, by default /var/abs
ABSDIR=/media/usb/builder/abs
# Set me to your PlugApps Github clone
GITDIR=/media/usb/builder/plugapps
# Set me to the directory you want to work in
WORKDIR=/media/usb/builder/tmper
# Set me to the makepkg command - The default below should work fine
MAKEPKGCMD="makepkg --ignorearch --asroot --clean --syncdeps --noconfirm --rmdeps"
# ==== THE PROCESS ====
# Sync ABS to get latest PKGBUILDs
abs
mkdir -p $WORKDIR
# Copy vanilla ABS PKGBUILDs first...
echo "Copying PKGBUILDs to the working directory..."
cp -r $ABSDIR/$1 $WORKDIR
# Now overwrite them with modified Git PKGBUILDs (Testing)
cp -r $GITDIR/$1 $WORKDIR
# Here's the actual building
cd $WORKDIR/$1
# In the workdir, go to the repository, find the names of folders,
# go into each folder, run makepkg, and go to the next folder...
for i in `find . -type d -maxdepth 1 -mindepth 1`; do
cd $i > /dev/null 2>&1
$MAKEPKGCMD
done
echo "Deleting PKGBUILDs from the working directory..."
rm -rf $WORKDIR/$1
echo "All done!"