fix bug where the countdown would be on multiple lines

Example of problem:

ATTENTION: Merging pull request #731 from remibergsma/centos7-kvm into 'master' branch in 5 seconds. CTRL+c to abort..
-n 5
-n 4
-n 3
-n 2
-n 1
-n 0

Should be compatible with more environments if printf is used instead.
This commit is contained in:
Remi Bergsma 2015-08-24 13:42:48 +02:00
parent fed5c2b06a
commit 9a24109f95
1 changed files with 2 additions and 1 deletions

View File

@ -207,10 +207,11 @@ echo "${prTitle}${prBody}" >> ${tmpMessageFile}
echo "ATTENTION: Merging pull request #${prId} from ${prOriginBranch} into '${currentBranch}' branch in 5 seconds. CTRL+c to abort.."
sec=5
while [ $sec -ge 0 ]; do
echo -n "${sec} "
printf "${sec} "
sec=$((sec-1))
sleep 1
done
echo
echo "INFO: Executing the merge now.. Git output below:"
echo "INFO: ***********************************************************************************"