Script 'schedule': remove a trailing slash by 'sed'.
This commit is contained in:
parent
4f2aa7d50c
commit
42167effaa
4
schedule
4
schedule
@ -75,9 +75,7 @@ function setup_repo {
|
|||||||
if [[ -z $TOURNAMENT ]]; then
|
if [[ -z $TOURNAMENT ]]; then
|
||||||
local year_dir=$(ls -1 -d ${REPO_DIR}/[0-9][0-9][0-9][0-9]/ | tail -1)
|
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 \
|
TOURNAMENT=$(ls -1 -d ${year_dir}[0-9]-*/ | tail -1 \
|
||||||
| sed -E "s|${REPO_DIR}/(.*)|\1|")
|
| sed -E "s|${REPO_DIR}/(.*)/|\1|")
|
||||||
# Remove the trailing slash
|
|
||||||
TOURNAMENT=${TOURNAMENT%/}
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user