Skip to content

Commit

Permalink
libtool needs to be installed. Fix referencing the right files.
Browse files Browse the repository at this point in the history
  • Loading branch information
lattera committed Feb 27, 2012
1 parent 587eba7 commit 0080392
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions portbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date=`/bin/date '+%F_%T'`
curdir="$(cd "$(dirname $0)" && pwd)"

# Step 1 - Sanity checking
if [ ! -f "pkgs.txt" ]; then
if [ ! -f "${curdir}/pkgs.txt" ]; then
echo "Please enter packages you would like to build in pkgs.txt"
exit 1
fi
Expand All @@ -17,21 +17,32 @@ if [ $# -gt 0 ]; then
done
fi

if [ -f "pkgexcludes.txt" ]; then
for exclude in `cat pkgexcludes.txt`; do
if [ -f "${curdir}/pkgexcludes.txt" ]; then
for exclude in `cat ${curdir}/pkgexcludes.txt`; do
excludes="${excludes} | grep -v ${exclude}"
done
fi

# Step 4 - Set up initial logging
exec 1> $curdir/logs/$date
exec 2>&1

# Step 4 - Delete all packages minus the above excluded packages
# Step 5 - Delete all packages minus the above excluded packages
cmd="pkg_info | awk '{print \$1;}' ${excludes} | xargs sudo pkg_delete"
eval $cmd

# Step 5 - Build new packages
for pkg in `cat pkgs.txt`; do
# Step 6 - Make sure libtool is installed
pkg_info | grep libtool > /dev/null

if [ $? -gt 0 ]; then
echo "==== Installing libtool ===="

cd /usr/ports/devel/libtool
sudo make DISABLE_LICENSES=YES BATCH=YES package-recursive clean
fi

# Step 7 - Build new packages
for pkg in `cat ${curdir}/pkgs.txt`; do
logfile=`echo $pkg | sed 's/\//_/g'`
exec 1> $curdir/logs/$date-$logfile
exec 2>&1
Expand Down

0 comments on commit 0080392

Please sign in to comment.