mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-03-28 21:16:20 +01:00
Symlink pages.en
to pages
(#11139)
* Symlink `pages.en` to `pages` * Update `build.sh` to symlink `pages.en` to `pages`
This commit is contained in:
parent
44e52ced0c
commit
af2f6d9d3e
2 changed files with 18 additions and 11 deletions
1
pages.en
Symbolic link
1
pages.en
Symbolic link
|
@ -0,0 +1 @@
|
|||
pages
|
|
@ -35,19 +35,25 @@ function build_translation_archives {
|
|||
rm -f "$target_directory/*"
|
||||
|
||||
for lang_dir in "$source_directory"/pages*; do
|
||||
if [ -d "$lang_dir" ]; then
|
||||
local lang=$(basename "$lang_dir")
|
||||
local archive_name="tldr-$lang.zip"
|
||||
|
||||
# Create the zip archive
|
||||
|
||||
cd "$lang_dir"
|
||||
zip -q -r "$target_directory/$archive_name" .
|
||||
zip -q -j "$target_directory/$archive_name" "$source_directory/LICENSE.md"
|
||||
|
||||
echo "Pages archive of $archive_name successfully created."
|
||||
# Skip symlinks (pages.en) and things that are not directories
|
||||
if [ ! -d "$lang_dir" ] || [ -h "$lang_dir" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
local lang=$(basename "$lang_dir")
|
||||
local archive_name="tldr-$lang.zip"
|
||||
|
||||
# Create the zip archive
|
||||
|
||||
cd "$lang_dir"
|
||||
zip -q -r "$target_directory/$archive_name" .
|
||||
zip -q -j "$target_directory/$archive_name" "$source_directory/LICENSE.md"
|
||||
|
||||
echo "Pages archive of $archive_name successfully created."
|
||||
done
|
||||
|
||||
cd "$target_directory"
|
||||
ln -s tldr-pages.zip tldr-pages.en.zip
|
||||
}
|
||||
|
||||
###################################
|
||||
|
|
Loading…
Add table
Reference in a new issue