marcusmerge-update for the lazy
Franz Klammer
klammer at webonaut.com
Sun Jun 1 06:47:54 PDT 2003
attached a update for the lazy tester (like me) ;-)
- add option -a as shortcut for -u -l -p
- save `basename $0` in $SCRIPTNAME
- if exists include /usr/local/etc/${SCRIPTNAME}.cfg
to avoid editing the script after every update
also changed:
- use the real scriptname in the usage: message
- respect ${VERBOSE} when doing cvsup
franz.
--
WEBONAUT.com
http://webonaut.com
mailto:klammer at webonaut.com
-------------- next part --------------
--- marcusmerge.orig Sun Jun 1 15:16:00 2003
+++ marcusmerge Sun Jun 1 15:35:56 2003
@@ -10,6 +10,12 @@
# You do not have to change anything beyond this line.
+SCRIPTNAME=`basename $0`
+
+if [ -f /usr/local/etc/${SCRIPTNAME}.cfg ]; then
+. /usr/local/etc/${SCRIPTNAME}.cfg
+fi
+
PKGVERSION_CMD="/usr/sbin/pkg_version"
PKGVERSION_ARGS="-l \<"
@@ -21,10 +27,10 @@
update_main="no"
pkgversion="no"
updating="no"
-args=`getopt pluvs:d:c:m: $*`
+args=`getopt apluvs:d:c:m: $*`
if [ $? != 0 ]; then
- echo "usage: marcusmerge [-s <directory>] [-d <directory>] [-c <cvsroot>] [-m <module>] [-u] [-v] [-l] [-p]"
+ echo "usage: `basename $0` [-s <directory>] [-d <directory>] [-c <cvsroot>] [-m <module>] [-u] [-v] [-l] [-p] [-a]"
exit 1
fi
@@ -56,6 +62,11 @@
-p)
update_main="yes";
shift;;
+ -a)
+ updating="yes";
+ pkgversion="yes";
+ update_main="yes";
+ shift;;
--)
shift; break;;
esac
@@ -116,7 +127,11 @@
if [ ${update_main} = "yes" ]; then
echo "===> Updating the main ports tree"
- ${CVSUP_CMD} ${SUPFILE}
+ if [ ${VERBOSE} = "yes" ]; then
+ ${CVSUP_CMD} ${SUPFILE}
+ else
+ ${CVSUP_CMD} ${SUPFILE} -L0
+ fi
echo "===> Updating done."
fi
More information about the freebsd-gnome
mailing list