Fix ./scripts/lsync.sh script not getting EN_VERSION variable correctly

pull/34634/head
Mengjiao Liu 2022-06-27 11:58:39 +08:00
parent 99dfe3670f
commit 2ae47fc211
1 changed files with 2 additions and 2 deletions

View File

@ -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