mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
56 lines
1.5 KiB
Bash
Executable file
56 lines
1.5 KiB
Bash
Executable file
#!/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/Plugbox/builder/abs
|
|
|
|
# Set me to your PlugApps Github clone
|
|
GITDIR=/media/Plugbox/builder/plugapps
|
|
|
|
# Set me to the directory you want to work in
|
|
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...
|
|
|
|
for i in `find . -maxdepth 1 -mindepth 1 -type d`; do
|
|
cd $i > /dev/null 2>&1
|
|
$MAKEPKGCMD
|
|
cd ../$i > /dev/null 2>&1
|
|
done
|
|
|
|
echo "Deleting PKGBUILDs from the working directory..."
|
|
rm -rf $WORKDIR/$1
|
|
echo "All done!"
|