From: Charles McGarvey Date: Mon, 2 Sep 2019 23:53:04 +0000 (-0600) Subject: Merge branch 'upstream' X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fhomebank;a=commitdiff_plain;h=160a363125e5d06f47eb22b333788097e4f01362;hp=461ad71822d907422deeabce0ffe5e506d0f5e3f Merge branch 'upstream' --- diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d9a081e --- /dev/null +++ b/.editorconfig @@ -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 = false +trim_trailing_whitespace = false + +[*.xml] +charset = utf8 +indent_size = 2 +indent_style = space +insert_final_newline = false +trim_trailing_whitespace = false + diff --git a/bootstrap b/bootstrap new file mode 100755 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 index 0000000..f591813 --- /dev/null +++ b/maint/import_upstream.sh @@ -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 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 +