6 Star 29 Fork 10

Gitee 极速下载/aria2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/aria2/aria2
克隆/下载
import-po 1.18 KB
一键复制 编辑 原始数据 按行查看 历史
a1346054 提交于 2021-08-21 13:03 . Fix shellcheck warnings
#!/bin/sh -e
# Update po files using launchpad-export.tar.gz
WORK_DIR=launchpad-work
INPUT_TGZ=$1
PO_DIR=po
if [ -z "$INPUT_TGZ" ]; then
echo "Usage: import-po /path/to/launchpad-export.tar.gz"
echo "Specify input launchpad-export.tar.gz file"
exit 1
fi
if [ ! -e "$INPUT_TGZ" ]; then
echo "Input file $INPUT_TGZ does not exist"
exit 1
fi
if [ -e "$WORK_DIR" ]; then
rm -rf "$WORK_DIR"
fi
mkdir "$WORK_DIR"
echo "Extracting po files from the archive..."
tar -x -C "$WORK_DIR" -f "$INPUT_TGZ"
echo "Renaming po files..."
# The directory structure of launchpad-export.tar.gz is a bit
# strange. It even contains absolute file path. We first gather all
# files in top level directory.
mv "$WORK_DIR"/aria2/*.po "$WORK_DIR"
echo -n "en@quot en@boldquot" > "$PO_DIR"/LINGUAS
for file in "$WORK_DIR"/*.po; do
# First remove useless '\r' in messages
sed -i -e 's/\\r//' "$file"
bn=$(basename "$file")
bn=${bn#aria2-}
dst="$PO_DIR"/"$bn"
# copy file to po directory
echo "Moving \`$file' to \`$dst'..."
mv "$file" "$dst"
# Update LINGUAS here too.
echo -n " ${bn%.po}" >> "$PO_DIR"/LINGUAS
done
rm -rf "$WORK_DIR"
cd "$PO_DIR"
make update-po
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/aria2.git
git@gitee.com:mirrors/aria2.git
mirrors
aria2
aria2
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385