PKGBUILDs/scripts/recursive-builder

57 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
2010-07-30 06:41:52 +00:00
ABSDIR=/media/Plugbox/builder/abs
# Set me to your PlugApps Github clone
2010-07-30 06:41:52 +00:00
GITDIR=/media/Plugbox/builder/plugapps
# Set me to the directory you want to work in
2010-07-30 06:41:52 +00:00
WORKDIR=/media/Plugbox/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...
2010-05-20 21:45:07 +00:00
for i in `find . -maxdepth 1 -mindepth 1 -type d`; do
cd $i > /dev/null 2>&1
$MAKEPKGCMD
2010-05-20 21:45:07 +00:00
cd ../$i > /dev/null 2>&1
done
echo "Deleting PKGBUILDs from the working directory..."
rm -rf $WORKDIR/$1
echo "All done!"