SPECS: builder - add --init-rpm-dir command
glen
glen at pld-linux.org
Sun Feb 5 17:12:34 CET 2006
Author: glen Date: Sun Feb 5 16:12:34 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add --init-rpm-dir command
---- Files affected:
SPECS:
builder (1.404 -> 1.405)
---- Diffs:
================================================================
Index: SPECS/builder
diff -u SPECS/builder:1.404 SPECS/builder:1.405
--- SPECS/builder:1.404 Sat Jan 28 18:35:14 2006
+++ SPECS/builder Sun Feb 5 17:12:29 2006
@@ -290,6 +290,7 @@
constructions. Set GROUP_BCONDS to yes to make use of it.
--target <platform>, --target=<platform>
- build for platform <platform>.
+--init-rpm-dir - initialize ~/rpm directory structure
"
}
@@ -1560,6 +1561,27 @@
fi
}
+init_rpm_dir() {
+
+ TOP_DIR="`eval $RPM $RPMOPTS --eval '%{_topdir}'`"
+ CVSROOT=":pserver:cvs@$CVS_SERVER:/cvsroot"
+
+ mkdir -p $TOP_DIR/{RPMS,BUILD,SRPMS}
+ cd $TOP_DIR
+ cvs -d $CVSROOT co SOURCES/.cvsignore SPECS/{mirrors,adapter{,.awk},fetchsrc_request,builder,repackage.sh}
+
+ init_builder
+
+ echo "To checkout *all* .spec files:"
+ echo "- remove $SPECS_DIR/CVS/Entries.Static"
+ echo "- run cvs up in $SPECS_DIR dir"
+
+ echo ""
+ echo "To commit with your developer account:"
+ echo "- edit $SPECS_DIR/CVS/Root"
+ echo "- edit $SOURCE_DIR/CVS/Root"
+}
+
#---------------------------------------------
# main()
@@ -1749,6 +1771,9 @@
-Upi | --update-poldek-indexes )
UPDATE_POLDEK_INDEXES="yes"
shift ;;
+ --init-rpm-dir)
+ COMMAND="init_rpm_dir";
+ shift ;;
-u | --try-upgrade )
TRY_UPGRADE="1"; shift ;;
-un | --try-upgrade-with-float-version )
@@ -1931,6 +1956,9 @@
for SAP in $SAPS ; do
echo $SOURCE_DIR/$(echo $SAP | awk '{gsub(/.*\//,"") ; print }')
done
+ ;;
+ "init_rpm_dir")
+ init_rpm_dir
;;
"usage" )
usage;;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/builder?r1=1.404&r2=1.405&f=u
More information about the pld-cvs-commit
mailing list