#!/bin/bash

# Modify the first line in the changelog file:
#
# start with bionic and match the version numbers, for example
#
# mkusb (12.7.0-1ubuntu1) bionic; urgency=medium

echo "Running '${0##*/}' ...
-------------------------------------------"

cd /media/multimed-2/test/launchpad/mkusb9

echo "If you must change the debian/control file
remember to edit debian/control0
-------------------------------------------"

ans=n;read -p "dch -D bionic (y/N) " ans
if [ "$ans" == "y" ];then
 dch -D bionic
else
 exit 1
fi
ans=n;read -p "./update-control (y/N) " ans
if [ "$ans" == "y" ];then
 ./update-control   ## remember this new script
fi
ans=n;read -p "debuild -S (y/N) " ans
if [ "$ans" == "y" ];then
 debuild -S
else
 exit 1
fi
cd /media/multimed-2/test/launchpad/
filnam=$(ls -1tr *.changes|tail -n1)

ans=n;read -p "dput  ppa:mkusb/unstable $filnam (y/N) " ans
if [ "$ans" == "y" ];then
 dput  ppa:mkusb/unstable $filnam     ## TAB to get current new-file.changes
else
 exit 1
fi
# dput  ppa:mkusb/ppa  new-file.changes
# dput  ppa:mkusb/unstable  new-file.changes
