Skip to content
Snippets Groups Projects
Commit 15b678b5 authored by Jean-Noël Avila's avatar Jean-Noël Avila
Browse files

convert the update-sources script to python

parent a1443dea
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@ po4a-stamp: po4a.conf $(EN_SOURCES) $(LANGUAGE_PO) Makefile
@touch $@
update-sources:
@./scripts/update-sources.sh
@./scripts/update-sources
$(QUIET_PO4A)PERL5LIB=./po4a/lib po4a/po4a -v --no-translations po4a.conf
@for f in po/documentation.*.po; do ./scripts/pre-translate-po $$f; done
@./scripts/set-priorities po/documentation.*.po
......
#!/usr/bin/python
import shutil
with open('sources.txt') as f:
sources = f.read().splitlines()
for source in sources:
try:
shutil.copy2(f"../{source}", f"en/{source}")
except FileNotFoundError:
print(f"File not found: {source}")
except shutil.SameFileError:
print(f"File is the same: {source}")
shutil.copy2("../../GIT-VERSION-FILE", ".")
#!/bin/bash
for f in $(cat sources.txt)
do
ln -f ../$f en/$f
done
cp ../../GIT-VERSION-FILE .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment