Skip to content

Commit 2ae47fc

Browse files
author
Mengjiao Liu
committed
Fix ./scripts/lsync.sh script not getting EN_VERSION variable correctly
1 parent 99dfe36 commit 2ae47fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/lsync.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fi
2020
if [ -d "$1" ] ; then
2121
SYNCED=1
2222
for f in `find $1 -name "*.md"` ; do
23-
EN_VERSION=`echo $f | sed "s/content\/..\//content\/en\//g"`
23+
EN_VERSION=`echo $f | sed "s/content\/.\{2,5\}\//content\/en\//g"`
2424
if [ ! -e $EN_VERSION ]; then
2525
echo -e "**removed**\t$EN_VERSION"
2626
SYNCED=0
@@ -43,7 +43,7 @@ fi
4343
LOCALIZED="$1"
4444

4545
# Try get the English version
46-
EN_VERSION=`echo $LOCALIZED | sed "s/content\/..\//content\/en\//g"`
46+
EN_VERSION=`echo $LOCALIZED | sed "s/content\/.\{2,5\}\//content\/en\//g"`
4747
if [ ! -e $EN_VERSION ]; then
4848
echo "$EN_VERSION has been removed."
4949
exit 3

0 commit comments

Comments
 (0)