spiegel-keyman/linux/scripts/reconf.sh
glasseyes 7fbba6036f use date of last git commit not current date for VERSION
more things needed in some README.repo

cow.sh: make it compatible with xenial
  set DIST for use with optional local .pbuilderrc, also in deb.sh
  link linux/.pbuilderrc to ~/.pbuilderrc if it doesn't exist
2018-09-15 17:49:28 +07:00

49 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
# autoreconf autotool projects
# parameters: ./reconf.sh [dev] [proj]
# dev = append current GMT datetime to VERSION
# proj = only reconf this project
set -e
BASEDIR=`pwd`
autotool_projects="kmflcomp libkmfl ibus-kmfl"
if [ "$2" != "" ]; then
autotool_projects="$2"
if [ ! -d "$2" ]; then
echo "project $2 does not exist"
exit 1
fi
fi
if [ "$1" == "dev" ]; then
vers=`cat VERSION`
# get datetime of latest git commit
datevers=`TZ=UTC git log -1 --pretty=format:%cd --date=format-local:%Y%m%d%H%M`
echo "$vers.${datevers}" > VERSION
else
if [ "$1" != "" ]; then
autotool_projects="$1"
if [ ! -d "$1" ]; then
echo "project $1 does not exist"
exit 1
fi
fi
fi
# autoreconf the projects
for proj in ${autotool_projects}; do
if [ "${proj}" != "keyman-config" ]; then
cd $proj
echo "Reconfiguring $proj to version `cat VERSION`"
autoreconf -if
cd $BASEDIR
fi
done
if [ "$1" == "dev" ]; then
echo "${vers}" > VERSION
fi