summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Victor Vasiliev <vasilvv@mit.edu>2013-09-13 21:00:20 -0400
committerGravatar Victor Vasiliev <vasilvv@mit.edu>2013-09-13 21:00:20 -0400
commita29cbc26e3270962c15e46398dc4202f3fb2b5b4 (patch)
treeaf79da1ca48ebe1aff8d7c07eafacdf927c43a0a
Initial check-in
-rwxr-xr-xfmtn19
-rwxr-xr-xfmtq31
2 files changed, 50 insertions, 0 deletions
diff --git a/fmtn b/fmtn
new file mode 100755
index 0000000..055ee98
--- /dev/null
+++ b/fmtn
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+set -e
+
+cd debian
+mkdir -v source
+echo -e "3.0 (native)" > source/format
+echo -e "[DEFAULT]\nupstream-tree=branch\nupstream-branch=master\ndebian-branch=master" > gbp.conf
+cd ..
+
+dch -U "Add git-buildpackage configuration"
+dch "Set source format to 3.0 (native)"
+dch --distribution=unstable -r ""
+git add debian/source/ debian/gbp.conf debian/changelog
+
+git commit -m "Make the package work with git buildpackage
+
+Add gbp.conf and source/format."
+
diff --git a/fmtq b/fmtq
new file mode 100755
index 0000000..bccc680
--- /dev/null
+++ b/fmtq
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+
+git checkout master
+git branch debian
+git rm -r debian/
+git commit -m "Remove Debian packaging from master"
+git checkout debian
+git merge master -s ours --no-ff -m 'Retain Debian packaging on debian branch'
+
+echo -e "[DEFAULT]\nupstream-tree=branch\nupstream-branch=master\ndebian-branch=debian" > debian/gbp.conf
+git add debian/gbp.conf
+
+dch -U "Add git-buildpackage configuration"
+
+if [ -f debian/source/format ]; then
+ dch --distribution=unstable -r ""
+ git add debian/changelog
+ git commit -m "Add git-buildpackage configuration"
+else
+ echo -e "3.0 (quilt)" > debian/source/format
+
+ dch "Set source format to 3.0 (quilt)"
+ dch --distribution=unstable -r ""
+ git add debian/source/ debian/changelog
+
+ git commit -m "Make the package work with git buildpackage
+
+Add gbp.conf and source/format."
+fi