鸿 网 互 联 www.68idc.cn

当前位置 : 服务器租用 > 服务器相关 > 批处理 > >

从Alfresco 3.4.c 中提取英文语言包

来源:互联网 作者:佚名 时间:2016-03-03 12:14
在Ubuntu 10.10下运行,从已安装的Alfresco 3.4.c中提取英文语言包 语言包 Alfresco #!/bin/bash#defind the root of Alfrescoroot_dir=/opt/alfresco-3.4.c#defind the destinationdest_dir=./alfresco#if dest_dir is existed, remove it and create a new o
在Ubuntu 10.10下运行,从已安装的Alfresco 3.4.c中提取英文语言包 语言包 Alfresco
#!/bin/bash

#defind the root of Alfresco
root_dir=/opt/alfresco-3.4.c

#defind the destination
dest_dir=./alfresco
#if dest_dir is existed, remove it and create a new one
#Caution, every thing below the folder will be erased!!!
if [ -e $dest_dir ]
then 
	rm -r $dest_dir
fi
mkdir $dest_dir

#find out all the Italian translation files, include "_it_IT" string
for it_file in $(find $root_dir -name "*_it_IT*")
do
	it_dir=$(dirname $it_file)
	it_dir=${it_dir//$root_dir/$dest_dir}
	if ! [ -e $it_dir ]
	then
		mkdir -p $it_dir
	fi	

	us_file=${it_file//_it_IT/}
	
	if ! [ -e $us_file ]
	then
		us_file=${it_file//_it_IT/en_US}
	fi

	if ! [ -e $us_file ]
	then	
		us_file=$it_file
	fi	
	cp $us_file $it_dir
	let "i=$i+1"
done
tar -cf alfresco.tar $dest_dir
echo $i
网友评论
<