X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=dcp-init;h=262a2bbd86349c4f6e5f6e801951930cc0660187;hb=078110f603005fe613307254dfbc317f0d0b1b40;hp=6984bad536f6214ea2068a569b906244e309a946;hpb=8bcd59df8f5afac0ab3c7cf0e3fe91491958e82b;p=dcp.git diff --git a/dcp-init b/dcp-init index 6984bad..262a2bb 100755 --- a/dcp-init +++ b/dcp-init @@ -3,10 +3,11 @@ set -e usage() { - echo "usage: dcp-init [-C key=val] [-d REPODIR] PACKAGE [PATCH...]" + echo "usage: dcp-init [-sh] [-C key=val] [-d REPODIR] PACKAGE [(PATCH|-m)...]" echo " PATCH ::= [-p LEVEL] [-bB BRANCH] FILE" echo " -b creates a new branch at the current patch" echo " -B creates a new branch at the upstream sources" + echo " -m merges the current branch into the master branch" } rungit() { @@ -42,7 +43,7 @@ getaptsrc() { } initrepo() { - rungit init -q --shared + rungit init mkdir "$td/control" touch "$td/control/conf" rungit add control @@ -55,6 +56,11 @@ initbase() { mkdir "$td/control/update.d" cat >"$td/control/functions" <&2 exit 1 @@ -229,5 +245,9 @@ while [ $# -gt 0 ]; do done git clone -q --bare "$td" "$repodir" +if [ "$shared" = y ]; then + chmod -R g+w "$repodir" + td="$repodir" rungit config core.sharedrepository 1 +fi rm -rf "$td"