From 42167effaaecf837c615829df6a7aeeb21d1b49c Mon Sep 17 00:00:00 2001 From: vonavi Date: Fri, 28 Nov 2014 16:59:31 +0300 Subject: [PATCH] Script 'schedule': remove a trailing slash by 'sed'. --- schedule | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/schedule b/schedule index ba11290..1ae875f 100755 --- a/schedule +++ b/schedule @@ -75,9 +75,7 @@ function setup_repo { if [[ -z $TOURNAMENT ]]; then local year_dir=$(ls -1 -d ${REPO_DIR}/[0-9][0-9][0-9][0-9]/ | tail -1) TOURNAMENT=$(ls -1 -d ${year_dir}[0-9]-*/ | tail -1 \ - | sed -E "s|${REPO_DIR}/(.*)|\1|") - # Remove the trailing slash - TOURNAMENT=${TOURNAMENT%/} + | sed -E "s|${REPO_DIR}/(.*)/|\1|") fi fi }