From f79798282c56d676fd9f7813d17b85b30265973d Mon Sep 17 00:00:00 2001 From: Marcelo Gardini Date: Mon, 21 Sep 2020 18:40:21 -0300 Subject: [PATCH] Not working in Ubuntu 20.04 Fixing characters_offset printing --- bin/gantt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/gantt b/bin/gantt index 3ac6be8..47c8e11 100755 --- a/bin/gantt +++ b/bin/gantt @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # gantt # Copyright (C) 2018, Andrew Steel @@ -356,7 +356,7 @@ main () {( test "${#SUBTASK_NAME}" -gt "${MAX_NAME_LENGTH:-0}" \ && MAX_NAME_LENGTH="${#SUBTASK_NAME}" SUBTASK_ESTIMATE_MAX="$(subtask_get_estimate_max "${SUBTASK}")" - TOTAL_ESTIMATE_TIME="$(( TOTAL_ESTIMATE_TIME + "${SUBTASK_ESTIMATE_MAX:-0}" ))" + TOTAL_ESTIMATE_TIME="$(( TOTAL_ESTIMATE_TIME + ${SUBTASK_ESTIMATE_MAX:-0} ))" done <<- EOF ${SUBTASKS} EOF @@ -412,8 +412,8 @@ main () {( printf "%s-%s" "${SUBTASK_ESTIMATE_MIN}" "${SUBTASK_ESTIMATE_MAX}" fi )" - characters_offset="$(( characters_offset + ${#SUBTASK_ESTIMATE_BAR} ))" - total_hours="$(( total_hours + "${SUBTASK_ESTIMATE_MAX:-0}" ))" + characters_offset="$(( characters_offset + ${SUBTASK_ESTIMATE_MAX:-0} ))" + total_hours="$(( total_hours + ${SUBTASK_ESTIMATE_MAX:-0} ))" done <<- EOF ${SUBTASKS} EOF