Dolda2000 GitWeb
/
dcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added -m operation to dcp-init.
[dcp.git]
/
dcp-init
diff --git
a/dcp-init
b/dcp-init
index
ab3dfc3
..
262a2bb
100755
(executable)
--- a/
dcp-init
+++ b/
dcp-init
@@
-3,10
+3,11
@@
set -e
usage() {
set -e
usage() {
- echo "usage: dcp-init [-sh] [-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 " 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() {
}
rungit() {
@@
-55,6
+56,11
@@
initbase() {
mkdir "$td/control/update.d"
cat >"$td/control/functions" <<EOF
readconf() {
mkdir "$td/control/update.d"
cat >"$td/control/functions" <<EOF
readconf() {
+ if [ -r "\$HOME/.dcp-build-conf" ]; then
+ while read key val; do
+ export "CONF_\$key"="\$val"
+ done <"\$HOME/.dcp-build-conf"
+ fi
while read key val; do
export "CONF_\$key"="\$val"
done <control/conf
while read key val; do
export "CONF_\$key"="\$val"
done <control/conf
@@
-109,7
+115,7
@@
initapt() {
set -e
set -e
-cmd=(dpkg-buildpackage -b)
+cmd=(dpkg-buildpackage -b
-rfakeroot
)
if [ -n "\$CONF_MAINTAINER" ]; then
cmd=("\${cmd[@]}" "-m\$CONF_MAINTAINER")
fi
if [ -n "\$CONF_MAINTAINER" ]; then
cmd=("\${cmd[@]}" "-m\$CONF_MAINTAINER")
fi
@@
-201,6
+207,7
@@
initvals() {
level=0
}
initvals
level=0
}
initvals
+curbranch=master
while [ $# -gt 0 ]; do
arg="$1"
shift
while [ $# -gt 0 ]; do
arg="$1"
shift
@@
-209,10
+216,16
@@
while [ $# -gt 0 ]; do
level="$1"
shift
elif [ "$arg" = -b ]; then
level="$1"
shift
elif [ "$arg" = -b ]; then
-
rungit checkout -q -b
"$1"
+
curbranch=
"$1"
shift
shift
+ rungit checkout -q -b "$curbranch"
elif [ "$arg" = -B ]; then
elif [ "$arg" = -B ]; then
- rungit checkout -q -b "$1" upstream
+ curbranch="$1"
+ shift
+ rungit checkout -q -b "$curbranch" upstream
+ elif [ "$arg" = -m ]; then
+ rungit checkout -q master
+ rungit merge -n "$curbranch"
else
echo "dcp-init: unknown patch option '$arg'" >&2
exit 1
else
echo "dcp-init: unknown patch option '$arg'" >&2
exit 1