Permalink
Browse files

Commit some maintenance scripts

These files were on the server but for some reason never made its way
to the git repo (they are used rarely). Some of these are a bit
useful, so for now let's commit them.
  • Loading branch information...
AlexDaniel committed Jun 2, 2018
1 parent af89312 commit 53f83c0b577c0af2b3d382ced46115b17b900ad7
Showing with 46 additions and 0 deletions.
  1. +13 −0 maintenance/pull-uniprops
  2. +21 −0 maintenance/recompress
  3. +12 −0 maintenance/verify-and-unbust
@@ -0,0 +1,13 @@
#!/bin/bash
curl 'http://unicode.org/Public/UNIDATA/PropertyAliases.txt' | grep -Po '^[^ ]+\s+; \K[^ ]+' > uniprops
echo Emoji >> uniprops
echo Emoji_Presentation >> uniprops
echo Emoji_Modifier >> uniprops
echo Emoji_Modifier_Base >> uniprops
echo Numeric_Value_Numerator >> uniprops
echo Numeric_Value_Denominator >> uniprops
echo NFG_QC >> uniprops
echo MVM_COLLATION_PRIMARY >> uniprops
echo X_SECONDARY >> uniprops
echo X_TERTIARY >> uniprops
echo MVM_COLLATION_QC >> uniprops
@@ -0,0 +1,21 @@
#!/bin/bash
# ↓ Run it like this ↓
# find builds/rakudo-moar/ -mindepth 1 -maxdepth 1 -size +5M -print0 | xargs -0 -n 1 -P 5 ./maintenance/recompress
ARCHIVES_LOCATION='./builds/rakudo-moar'
BUILDS_LOCATION='/tmp/whateverable/rakudo-moar'
archive_path=$1
archive_file=${1##*/}
sha=${archive_file%%.zst}
printf "%s\n" "$sha"
zstd -q -f -d -- "$archive_path" &&
zstd -q -19 -i "$ARCHIVES_LOCATION/$sha" -o "$archive_path" -f
rm -- "$ARCHIVES_LOCATION/$sha" # delete anyway, because can fail due to permissions
# If you want to retar, use stuff below ↓
# build_path="$BUILDS_LOCATION/$sha"
# zstd -dqc -- "$archive_path" | tar x --absolute-names
# tar cf - --absolute-names --remove-files -- "$build_path" | zstd -c -19 -q -o "$archive_path" -f
@@ -0,0 +1,12 @@
#!/bin/bash
ARCHIVES_LOCATION=$1
set -o pipefail
echo 'Removing these builds:'
for file in "$ARCHIVES_LOCATION"/*.zst; do
if ! pzstd -dqc -- "$file" | tar t &> /dev/null; then
echo "$file"
rm -- "$file"
fi
done

0 comments on commit 53f83c0

Please sign in to comment.