5 # $1 is changelog user and email, example "projectkk2glider <projectkk2glider@gmail.com>"
6 # $2 is distribution "trusty" OR "yakkety"
7 # $3 is version, example "2.2.1"
8 # $4 is suffix (optional, used for nightly builds, example "N360")
15 echo "Updating changelog for ${distro}"
19 [ -z ${distro} ] && echo "Missing distribution name" && exit 1;
20 [ ! -z ${suffix} ] && version=${version}~${suffix}
22 if [ ! -d ${distro} ] ; then
23 echo "${distro} changelog not found. Most likely unsupported distribution. Aborting..."
27 echo "opentx-companion22 (${version}~${distro}) ${distro}; urgency=low" > tmp-changelog
28 echo "" >> tmp-changelog
29 echo " * New release ${version}" >> tmp-changelog
30 echo "" >> tmp-changelog
31 echo " -- ${email} "`date -R` >> tmp-changelog
32 echo "" >> tmp-changelog
34 cat tmp-changelog
${distro}/changelog
> new-changelog
35 mv new-changelog
${distro}/changelog
38 echo "suffix=${suffix}" > common
/suffix
41 cat ${distro}/changelog |
head -n 20