Script 'game-add': remove a trailing slash by 'sed'.
This commit is contained in:
parent
52cb416ad8
commit
8e5a56a653
4
game-add
4
game-add
@ -55,9 +55,7 @@ function game_setup {
|
||||
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
|
||||
|
||||
# Configuration file for players
|
||||
|
Loading…
Reference in New Issue
Block a user