Skip to content

Commit

Permalink
hh2hstr finishing script fixes #309
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Aug 26, 2018
1 parent 9d38d58 commit 989ea70
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 42 deletions.
2 changes: 1 addition & 1 deletion build/fedora/rpm-from-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function compose() {
######################################################################################

#decompose
# build HSTR locally to get binaries w/ right dependencies > replace hh and hstr in decomposed .rpm
# build HSTR locally to get binaries w/ right dependencies > replace hstr and hh binaries in decomposed .rpm
compose

# sudo dnf install hstr.rpm
Expand Down
2 changes: 1 addition & 1 deletion build/test-gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cd .. && make clean && qmake CONFIG+=hstrdebug hstr.pro && make && gdb ./hh
cd .. && make clean && qmake CONFIG+=hstrdebug hstr.pro && make && gdb ./hstr

# eof
4 changes: 2 additions & 2 deletions build/ubuntu/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
hh (0.80-0ubuntu1) raring; urgency=low
hstr (0.80-0ubuntu1) raring; urgency=low

* Fixed keyboard loop; Ctrl-r consistent shortcuts; propagation of the text from the prompt to HH.
* Fixed keyboard loop; Ctrl-r consistent shortcuts; propagation of the text from the prompt to HSTR.

-- Martin Dvorak <[email protected]> Wed, 25 Dec 2013 17:21:31 +0100
6 changes: 3 additions & 3 deletions build/ubuntu/debian/control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: hh
Source: hstr
Section: utils
Priority: optional
Maintainer: Martin Dvorak <[email protected]>
Expand All @@ -8,10 +8,10 @@ Homepage: https://github.com/dvorka/hstr
Vcs-Git: https://github.com/dvorka/hstr.git
Vcs-Browser: https://github.com/dvorka/hstr

Package: hh
Package: hstr
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Suggest box like shell history completion
A command line utility that brings improved shell command completion
from the history. It aims to make completion easier and faster than Ctrl-r.
Tag: implemented-in::c++, interface::commandline, role::program
Tag: implemented-in::c, interface::commandline, role::program
2 changes: 1 addition & 1 deletion build/ubuntu/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: hh
Upstream-Name: hstr
Source: https://github.com/dvorka/hstr

Files: debian/*
Expand Down
67 changes: 34 additions & 33 deletions build/ubuntu/launchpad-make-all-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,24 @@
# This script cannot be run from Git repository. Launchpad release
# directory must exist.

export HHSRC=/home/dvorka/p/hstr/github/hstr
export HHRELEASEDIR=/home/dvorka/p/hstr/launchpad
export HSTRSRC=/home/dvorka/p/hstr/github/hstr
export HSTRRELEASEDIR=/home/dvorka/p/hstr/launchpad
export SCRIPTHOME=`pwd`

# ############################################################################
# # Checkout HSTR from bazaar and make it #
# ############################################################################

function checkoutHh() {
function checkoutHstr() {
echo "Checking out HSTR from Bazaar to `pwd`"
bzr checkout lp:~ultradvorka/+junk/hh-package
cd hh-package && mv -v .bzr .. && rm -rvf *.* && mv -v ../.bzr .
cp -rvf ${HHSRC}/* ${HHSRC}/*.* .
# Create new branch hstr-package: bzr init && bzr push lp:~ultradvorka/+junk/hstr-package
bzr checkout lp:~ultradvorka/+junk/hstr-package
cd hstr-package && mv -v .bzr .. && rm -rvf *.* && mv -v ../.bzr .
cp -rvf ${HSTRSRC}/* ${HSTRSRC}/*.* .
cd ..

echo "Preparing *configure using Autotools"
mv -v hh-package hstr
mv -v hstr-package hstr
cd ./hstr/build/tarball && ./tarball-automake.sh --purge && cd ../../..
}

Expand All @@ -56,9 +57,9 @@ function checkoutHh() {
function createChangelog() {
export MYTS=`date "+%a, %d %b %Y %H:%M:%S"`
echo "Changelog timestamp: ${MYTS}"
echo -e "hh (${HHFULLVERSION}) ${UBUNTUVERSION}; urgency=low" > $1
echo -e "hstr (${HSTRFULLVERSION}) ${UBUNTUVERSION}; urgency=low" > $1
echo -e "\n" >> $1
echo -e " * ${HHBZRMSG}" >> $1
echo -e " * ${HSTRBZRMSG}" >> $1
echo -e "\n" >> $1
echo -e " -- Martin Dvorak (Dvorka) <[email protected]> ${MYTS} +0100" >> $1
echo -e "\n" >> $1
Expand All @@ -71,11 +72,11 @@ function createChangelog() {
function createTarArchive() {
cd ..
mkdir work && cd work
cp -vrf ../${HH} .
rm -rvf ${HH}/.bzr
tar zcf ../${HH}.tgz ${HH}
cp -vf ../${HH}.tgz ../${HH}.orig.tar.gz
cd ../${HH}
cp -vrf ../${HSTR} .
rm -rvf ${HSTR}/.bzr
tar zcf ../${HSTR}.tgz ${HSTR}
cp -vf ../${HSTR}.tgz ../${HSTR}.orig.tar.gz
cd ../${HSTR}
rm -vrf ../work
}

Expand All @@ -85,26 +86,26 @@ function createTarArchive() {

function releaseForParticularUbuntuVersion() {
export UBUNTUVERSION=${1}
export HHVERSION=${2}
export HHBZRMSG=${3}
export HSTRVERSION=${2}
export HSTRBZRMSG=${3}

export HHFULLVERSION=${HHVERSION}-0ubuntu1
export HH=hh_${HHVERSION}
export HHRELEASE=hh_${HHFULLVERSION}
export HSTRFULLVERSION=${HSTRVERSION}-0ubuntu1
export HSTR=hstr_${HSTRVERSION}
export HSTRRELEASE=hstr_${HSTRFULLVERSION}
export NOW=`date +%Y-%m-%d--%H-%M-%S`
export HHBUILD=hstr-${NOW}
export HSTRBUILD=hstr-${NOW}

# checkout HSTR from Bazaar and prepare *configure using Autotools
mkdir ${HHBUILD} && cd ${HHBUILD}
checkoutHh `pwd`
mkdir ${HSTRBUILD} && cd ${HSTRBUILD}
checkoutHstr `pwd`

# commit changes to Bazaar
cd hstr
cp -rvf ${HHSRC}/build/ubuntu/debian .
cp -rvf ${HSTRSRC}/build/ubuntu/debian .
createChangelog ./debian/changelog
cd .. && mv hstr ${HH} && cd ${HH}
cd .. && mv hstr ${HSTR} && cd ${HSTR}
bzr add .
bzr commit -m "Update for ${HH} at ${NOW}."
bzr commit -m "Update for ${HSTR} at ${NOW}."

# create Tar archive
createTarArchive
Expand All @@ -125,24 +126,24 @@ function releaseForParticularUbuntuVersion() {
cd ../build-area

# build binary from source deb on CLEAN system - no deps installed
echo -e "\n_ hh pbuilder-dist build _______________________________________________\n"
echo -e "\n_ hstr pbuilder-dist build _______________________________________________\n"
# BEGIN: bug workaround - pbuilder's caches in /var and /home must be on same physical drive
export PBUILDFOLDER=/tmp/hh-tmp
export PBUILDFOLDER=/tmp/hstr-tmp
rm -rvf ${PBUILDFOLDER}
mkdir -p ${PBUILDFOLDER}
cp -rvf ~/pbuilder/*.tgz ${PBUILDFOLDER}
# END
pbuilder-dist ${UBUNTUVERSION} build ${HHRELEASE}.dsc
pbuilder-dist ${UBUNTUVERSION} build ${HSTRRELEASE}.dsc

# push .deb to Launchpad
cd ../${HH}
cd ../${HSTR}
# push Bazaar changes and upload .deb to Launchpad
echo "Before bzr push: " `pwd`
bzr push lp:~ultradvorka/+junk/hh-package
bzr push lp:~ultradvorka/+junk/hstr-package
cd ..
echo "Before dput push: " `pwd`
# recently added /ppa to fix the path and package rejections
dput ppa:ultradvorka/ppa ${HHRELEASE}_source.changes
dput ppa:ultradvorka/ppa ${HSTRRELEASE}_source.changes
}

# ############################################################################
Expand All @@ -156,9 +157,9 @@ then
echo "This script must NOT be run from Git repository - run it e.g. from ~/p/hstr/launchpad instead"
exit 1
fi
if [ ! -e "${HHRELEASEDIR}" ]
if [ ! -e "${HSTRRELEASEDIR}" ]
then
echo "ERROR: release directory must exist: ${HHRELEASEDIR}"
echo "ERROR: release directory must exist: ${HSTRRELEASEDIR}"
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion test/test-bug-228.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export HH_CONFIG=hicolor
export HSTR_CONFIG=hicolor
export HISTFILE=`pwd`/resources/.bash_history_BUG_228

# Choose regexp search and search for echo.\+
Expand Down

0 comments on commit 989ea70

Please sign in to comment.