aboutsummaryrefslogtreecommitdiff
path: root/mkport.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mkport.sh')
-rwxr-xr-xmkport.sh53
1 files changed, 29 insertions, 24 deletions
diff --git a/mkport.sh b/mkport.sh
index 3c87d250..b43c4b36 100755
--- a/mkport.sh
+++ b/mkport.sh
@@ -5,6 +5,7 @@
# Set the port
port="x11/lumina"
dfile="lumina"
+VERSION="1.2.2"
massage_subdir() {
cd "$1"
@@ -63,33 +64,37 @@ fi
ghtag=`git log -n 1 . | grep '^commit ' | awk '{print $2}'`
# Get the version
-if [ -e "version" ] ; then
- verTag=$(cat version)
-else
- verTag=$(date '+%Y%m%d%H%M')
-fi
+verTag="${VERSION}"
+dateTag=$(date '+%Y%m%d%H%M')
# Cleanup old distfiles
rm ${distdir}/${dfile}-* 2>/dev/null
# Copy ports files
-if [ -d "${portsdir}/${port}" ] ; then
- rm -rf ${portsdir}/${port} 2>/dev/null
-fi
-cp -r port-files/FreeBSD ${portsdir}/${port}
-
-# Set the version numbers
-sed -i '' "s|%%CHGVERSION%%|${verTag}|g" ${portsdir}/${port}/Makefile
-sed -i '' "s|%%GHTAG%%|${ghtag}|g" ${portsdir}/${port}/Makefile
-
-# Create the makesums / distinfo file
-cd "${portsdir}/${port}"
-make makesum
-if [ $? -ne 0 ] ; then
- echo "Failed makesum"
- exit 1
-fi
+orig_dir=`pwd`
+for port in `find port-files/FreeBSD | grep Makefile | cut -d / -f 3-4`
+do
+ cd ${orig_dir}
+ echo "Updating port: ${port}"
+ if [ -d "${portsdir}/${port}" ] ; then
+ rm -rf ${portsdir}/${port} 2>/dev/null
+ fi
+ cp -r port-files/FreeBSD/${port} ${portsdir}/${port}
+
+ # Set the version numbers
+ sed -i '' "s|%%CHGVERSION%%|${verTag}|g" ${portsdir}/${port}/Makefile
+ sed -i '' "s|%%CHGREVISION%%|${dateTag}|g" ${portsdir}/${port}/Makefile
+ sed -i '' "s|%%GHTAG%%|${ghtag}|g" ${portsdir}/${port}/Makefile
+
+ # Create the makesums / distinfo file
+ cd "${portsdir}/${port}"
+ make makesum
+ if [ $? -ne 0 ] ; then
+ echo "Failed makesum"
+ exit 1
+ fi
-# Update port cat Makefile
-tcat=$(echo $port | cut -d '/' -f 1)
-massage_subdir ${portsdir}/${tcat}
+ # Update port cat Makefile
+ tcat=$(echo $port | cut -d '/' -f 1)
+ massage_subdir ${portsdir}/${tcat}
+done
bgstack15