diff --git a/Makefile b/Makefile index 5eb482bb602579b396179a0a708cc683da2f9957..a18ac85499b405a582374f55574e320f6cd7bbcf 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/scripts/update-sources b/scripts/update-sources new file mode 100755 index 0000000000000000000000000000000000000000..70ea629eaa388e32fafe21a095d60ffc4273e666 --- /dev/null +++ b/scripts/update-sources @@ -0,0 +1,15 @@ +#!/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", ".") diff --git a/scripts/update-sources.sh b/scripts/update-sources.sh deleted file mode 100755 index 247207ee218385702072b836c4ba5fce157a5503..0000000000000000000000000000000000000000 --- a/scripts/update-sources.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -for f in $(cat sources.txt) -do - ln -f ../$f en/$f -done - -cp ../../GIT-VERSION-FILE .