Merge branch 'upstream'
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 25 Apr 2019 03:51:20 +0000 (21:51 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Thu, 25 Apr 2019 03:51:20 +0000 (21:51 -0600)
.editorconfig [new file with mode: 0644]
bootstrap [new file with mode: 0755]
maint/import_upstream.sh [new file with mode: 0755]

diff --git a/.editorconfig b/.editorconfig
new file mode 100644 (file)
index 0000000..d140832
--- /dev/null
@@ -0,0 +1,19 @@
+
+# Please follow these code style guidelines. You can use this file to
+# automatically configure your editor.
+# For instructions, see: http://editorconfig.org/
+
+[*.{c,h,xs}]
+charset                     = utf8
+indent_size                 = 4
+indent_style                = tab
+insert_final_newline        = true
+trim_trailing_whitespace    = true
+
+[*.xml]
+charset                     = utf8
+indent_size                 = 2
+indent_style                = space
+insert_final_newline        = true
+trim_trailing_whitespace    = true
+
diff --git a/bootstrap b/bootstrap
new file mode 100755 (executable)
index 0000000..83328e3
--- /dev/null
+++ b/bootstrap
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+aclocal \
+&& autoheader \
+&& automake --gnu --add-missing \
+&& autoconf
+
diff --git a/maint/import_upstream.sh b/maint/import_upstream.sh
new file mode 100755 (executable)
index 0000000..f591813
--- /dev/null
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+: <<'=cut'
+=pod
+
+=head1 NAME
+
+import_upstream.sh - Import HomeBank from upstream
+
+=head1 SYNOPSIS
+
+    ./maint/import_upstream.sh BRANCH
+
+    # import the latest release on the 5.1.x branch
+    ./maint/import_upstream.sh 5.1.x
+
+=head1 DESCRIPTION
+
+This script downloads the latest HomeBank release on a given branch and adds
+that release to the local C<upstream> branch.
+
+=cut
+
+export GIT_AUTHOR_NAME='Maxime Doyen'
+export GIT_AUTHOR_EMAIL='homebank@free.fr'
+
+branch_git='upstream'
+branch_bzr=$1
+shift
+
+if [ -z "$branch_bzr" ]
+then
+    echo >&2 "$0: Must specify homebank branch (e.g. \"5.1.x\")"
+    exit 1
+fi
+
+set -e
+
+# download homebank
+cleanup='rm -rf "$branch_bzr"'
+eval "$cleanup"
+trap "$cleanup" EXIT
+bzr branch "lp:homebank/$branch_bzr" "$branch_bzr"
+
+# determine version
+hb_version=$(perl <"$branch_bzr/src/homebank.h" -ne 's/#define HB_VERSION\s+"(.*)"/$1/ && print')
+if [ -z "$hb_version" ]
+then
+    echo >&2 "$0: Cannot determine homebank version"
+    exit 1
+fi
+
+cp .gitignore "$branch_bzr/"
+
+# commit new version of homebank
+git add "$branch_bzr"
+tree_ref=$(git write-tree --prefix="$branch_bzr/")
+git reset "$branch_bzr"
+parent_ref=$(git rev-parse "$branch_git")
+commit_ref=$(git commit-tree -m "import homebank-$hb_version" -p $parent_ref $tree_ref)
+
+# update branch
+git branch -f "$branch_git" $commit_ref
+
This page took 0.027277 seconds and 4 git commands to generate.