-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is gonna make the change history funny, but Markus requested this: #980 (comment)
- Loading branch information
Showing
3 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Script for | ||
# https://github.com/unicode-org/unicodetools/blob/main/docs/data-workflow.md#publish-an-alpha-snapshot | ||
# | ||
# Invoke like this: | ||
# | ||
# pub/copy-alpha-to-draft.sh ~/unitools/mine/src /tmp/unicode/Public/draft | ||
|
||
UNICODETOOLS=$1 | ||
DRAFT=$2 | ||
|
||
UNITOOLS_DATA=$UNICODETOOLS/unicodetools/data | ||
|
||
# Adjust the following for each year and version as needed. | ||
COPY_YEAR=2024 | ||
UNI_VER=17.0.0 | ||
EMOJI_VER=17.0 | ||
|
||
TODAY=`date --iso-8601` | ||
|
||
mkdir -p $DRAFT | ||
|
||
cat > $DRAFT/sed-readmes.txt << eof | ||
s/COPY_YEAR/$COPY_YEAR/ | ||
s/PUB_DATE/$TODAY/ | ||
s/PUB_STATUS/draft/ | ||
s/UNI_VER/$UNI_VER/ | ||
s/EMOJI_VER/$EMOJI_VER/ | ||
s%PUBLIC_EMOJI%Public/draft/emoji% | ||
s%PUBLIC_UCD%Public/draft/UCD% | ||
eof | ||
|
||
mkdir -p $DRAFT/UCD/ucd | ||
mkdir -p $DRAFT/zipped | ||
cp -r $UNITOOLS_DATA/ucd/dev/* $DRAFT/UCD/ucd | ||
rm -r $DRAFT/UCD/ucd/Unihan | ||
mv $DRAFT/UCD/ucd/version-ReadMe.txt $DRAFT/UCD/ReadMe.txt | ||
mv $DRAFT/UCD/ucd/zipped-ReadMe.txt $DRAFT/zipped/ReadMe.txt | ||
|
||
mkdir -p $DRAFT/emoji | ||
cp $UNITOOLS_DATA/emoji/dev/* $DRAFT/emoji | ||
|
||
mkdir -p $DRAFT/idna | ||
cp $UNITOOLS_DATA/idna/dev/* $DRAFT/idna | ||
|
||
mkdir -p $DRAFT/idna2008derived | ||
rm $DRAFT/idna2008derived/* | ||
cp $UNITOOLS_DATA/idna/idna2008derived/Idna2008-$UNI_VER.txt $DRAFT/idna2008derived | ||
cp $UNITOOLS_DATA/idna/idna2008derived/ReadMe.txt $DRAFT/idna2008derived | ||
|
||
# Fix permissions. Everyone can read, and search directories. | ||
chmod a+rX -R $DRAFT | ||
|
||
# Update the readmes in-place (-i) as set up above. | ||
find $DRAFT -name '*ReadMe.txt' | xargs sed -i -f $DRAFT/sed-readmes.txt | ||
|
||
# Zip files for some types of data, after fixing permissions | ||
rm $DRAFT/UCD/ucd/UCD.zip | ||
(cd $DRAFT/UCD/ucd; zip -r UCD.zip * && mv UCD.zip $DRAFT/zipped) | ||
|
||
# Cleanup | ||
rm $DRAFT/sed-readmes.txt | ||
|
||
rm $DRAFT/alpha.zip | ||
(cd $DRAFT; zip -r alpha.zip *) | ||
|
||
echo "--------------------" | ||
echo "Copy files from elsewhere:" | ||
echo "- Unihan.zip to $DRAFT/UCD/ucd" | ||
echo "- Unihan.zip to $DRAFT/zipped" | ||
echo "- alpha charts to $DRAFT/UCD/charts" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Script for | ||
# https://github.com/unicode-org/unicodetools/blob/main/docs/data-workflow.md#publish-a-beta-snapshot | ||
# | ||
# Invoke like this: | ||
# | ||
# pub/copy-beta-to-draft.sh ~/unitools/mine/src /tmp/unicode/Public/draft | ||
|
||
UNICODETOOLS=$1 | ||
DRAFT=$2 | ||
|
||
UNITOOLS_DATA=$UNICODETOOLS/unicodetools/data | ||
|
||
# Adjust the following for each year and version as needed. | ||
COPY_YEAR=2024 | ||
UNI_VER=17.0.0 | ||
EMOJI_VER=17.0 | ||
# UTS #10 release revision number to be used in CollationTest.html: | ||
# One more than the last release revision number. | ||
TR10_REV=tr10-52 | ||
|
||
TODAY=`date --iso-8601` | ||
|
||
mkdir -p $DRAFT | ||
|
||
cat > $DRAFT/sed-readmes.txt << eof | ||
s/COPY_YEAR/$COPY_YEAR/ | ||
s/PUB_DATE/$TODAY/ | ||
s/PUB_STATUS/draft/ | ||
s/UNI_VER/$UNI_VER/ | ||
s/EMOJI_VER/$EMOJI_VER/ | ||
s/TR10_REV/$TR10_REV/ | ||
s%PUBLIC_EMOJI%Public/draft/emoji% | ||
s%PUBLIC_UCD%Public/draft/UCD% | ||
eof | ||
|
||
mkdir -p $DRAFT/UCD/ucd | ||
mkdir -p $DRAFT/zipped | ||
cp -r $UNITOOLS_DATA/ucd/dev/* $DRAFT/UCD/ucd | ||
rm -r $DRAFT/UCD/ucd/Unihan | ||
mv $DRAFT/UCD/ucd/version-ReadMe.txt $DRAFT/UCD/ReadMe.txt | ||
mv $DRAFT/UCD/ucd/zipped-ReadMe.txt $DRAFT/zipped/ReadMe.txt | ||
|
||
mkdir -p $DRAFT/UCA | ||
cp -r $UNITOOLS_DATA/uca/dev/* $DRAFT/UCA | ||
sed -i -f $DRAFT/sed-readmes.txt $DRAFT/UCA/CollationTest.html | ||
|
||
mkdir -p $DRAFT/emoji | ||
cp $UNITOOLS_DATA/emoji/dev/* $DRAFT/emoji | ||
|
||
mkdir -p $DRAFT/idna | ||
cp $UNITOOLS_DATA/idna/dev/* $DRAFT/idna | ||
|
||
mkdir -p $DRAFT/idna2008derived | ||
rm $DRAFT/idna2008derived/* | ||
cp $UNITOOLS_DATA/idna/idna2008derived/Idna2008-$UNI_VER.txt $DRAFT/idna2008derived | ||
cp $UNITOOLS_DATA/idna/idna2008derived/ReadMe.txt $DRAFT/idna2008derived | ||
|
||
mkdir -p $DRAFT/security | ||
cp $UNITOOLS_DATA/security/dev/* $DRAFT/security | ||
|
||
# Fix permissions. Everyone can read, and search directories. | ||
chmod a+rX -R $DRAFT | ||
|
||
# Update the readmes in-place (-i) as set up above. | ||
find $DRAFT -name '*ReadMe.txt' | xargs sed -i -f $DRAFT/sed-readmes.txt | ||
|
||
# Zip files for some types of data, after fixing permissions | ||
rm $DRAFT/UCD/ucd/UCD.zip | ||
(cd $DRAFT/UCD/ucd; zip -r UCD.zip * && mv UCD.zip $DRAFT/zipped) | ||
|
||
rm $DRAFT/UCA/CollationTest.zip | ||
(cd $DRAFT/UCA; zip -r CollationTest.zip CollationTest && rm -r CollationTest) | ||
|
||
rm $DRAFT/security/*.zip | ||
(cd $DRAFT/security; zip -r uts39-data-$UNI_VER.zip *) | ||
|
||
# Fix permissions again to catch the zip files | ||
chmod a+rX -R $DRAFT | ||
|
||
# Cleanup | ||
rm $DRAFT/sed-readmes.txt | ||
|
||
# Zip file to deliver the whole set of data files | ||
rm $DRAFT/beta.zip | ||
(cd $DRAFT; zip -r beta.zip *) | ||
|
||
echo "--------------------" | ||
echo "Copy files from elsewhere:" | ||
echo "- Unihan.zip to $DRAFT/UCD/ucd" | ||
echo "- Unihan.zip to $DRAFT/zipped" | ||
echo "- UCDXML files to $DRAFT/UCD/ucdxml" | ||
echo "- beta charts to $DRAFT/UCD/charts" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Script for | ||
# https://github.com/unicode-org/unicodetools/blob/main/docs/data-workflow.md#publish-a-ucd-snapshot | ||
# | ||
# Invoke like this: | ||
# | ||
# pub/copy-ucd-to-draft.sh ~/unitools/mine/src /tmp/unicode/Public/draft | ||
|
||
UNICODETOOLS=$1 | ||
DRAFT=$2 | ||
|
||
UNITOOLS_DATA=$UNICODETOOLS/unicodetools/data | ||
|
||
# Adjust the following for each year and version as needed. | ||
COPY_YEAR=2024 | ||
UNI_VER=17.0.0 | ||
EMOJI_VER=17.0 | ||
|
||
TODAY=`date --iso-8601` | ||
|
||
mkdir -p $DRAFT | ||
|
||
cat > $DRAFT/sed-readmes.txt << eof | ||
s/COPY_YEAR/$COPY_YEAR/ | ||
s/PUB_DATE/$TODAY/ | ||
s/PUB_STATUS/draft/ | ||
s/UNI_VER/$UNI_VER/ | ||
s/EMOJI_VER/$EMOJI_VER/ | ||
s%PUBLIC_EMOJI%Public/draft/emoji% | ||
s%PUBLIC_UCD%Public/draft/UCD% | ||
eof | ||
|
||
mkdir -p $DRAFT/UCD/ucd | ||
mkdir -p $DRAFT/zipped | ||
cp -r $UNITOOLS_DATA/ucd/dev/* $DRAFT/UCD/ucd | ||
rm -r $DRAFT/UCD/ucd/Unihan | ||
rm -r $DRAFT/UCD/ucd/emoji | ||
mv $DRAFT/UCD/ucd/version-ReadMe.txt $DRAFT/UCD/ReadMe.txt | ||
mv $DRAFT/UCD/ucd/zipped-ReadMe.txt $DRAFT/zipped/ReadMe.txt | ||
|
||
# Fix permissions. Everyone can read, and search directories. | ||
chmod a+rX -R $DRAFT | ||
|
||
# Update the readmes in-place (-i) as set up above. | ||
find $DRAFT -name '*ReadMe.txt' | xargs sed -i -f $DRAFT/sed-readmes.txt | ||
|
||
# Zip files for some types of data, after fixing permissions | ||
rm $DRAFT/UCD/ucd/UCD.zip | ||
(cd $DRAFT/UCD/ucd; zip -r UCD.zip * && mv UCD.zip $DRAFT/zipped) | ||
|
||
# Cleanup | ||
rm $DRAFT/sed-readmes.txt | ||
|
||
rm $DRAFT/ucd-snapshot.zip | ||
(cd $DRAFT; zip -r ucd-snapshot.zip *) | ||
|
||
echo "--------------------" | ||
echo "Copy files from elsewhere:" | ||
echo "- Unihan.zip to $DRAFT/UCD/ucd" | ||
echo "- Unihan.zip to $DRAFT/zipped" | ||
|