From 2ae47fc211c6fb005733650279ad652aa67acbe2 Mon Sep 17 00:00:00 2001 From: Mengjiao Liu Date: Mon, 27 Jun 2022 11:58:39 +0800 Subject: [PATCH] Fix ./scripts/lsync.sh script not getting EN_VERSION variable correctly --- scripts/lsync.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lsync.sh b/scripts/lsync.sh index bac46c768a..32c29ac417 100755 --- a/scripts/lsync.sh +++ b/scripts/lsync.sh @@ -20,7 +20,7 @@ fi if [ -d "$1" ] ; then SYNCED=1 for f in `find $1 -name "*.md"` ; do - EN_VERSION=`echo $f | sed "s/content\/..\//content\/en\//g"` + EN_VERSION=`echo $f | sed "s/content\/.\{2,5\}\//content\/en\//g"` if [ ! -e $EN_VERSION ]; then echo -e "**removed**\t$EN_VERSION" SYNCED=0 @@ -43,7 +43,7 @@ fi LOCALIZED="$1" # Try get the English version -EN_VERSION=`echo $LOCALIZED | sed "s/content\/..\//content\/en\//g"` +EN_VERSION=`echo $LOCALIZED | sed "s/content\/.\{2,5\}\//content\/en\//g"` if [ ! -e $EN_VERSION ]; then echo "$EN_VERSION has been removed." exit 3