Add Gecko types and a script to update them (#4296)
This commit is contained in:
parent
3a59a68779
commit
cd5df6b2c0
7 changed files with 53668 additions and 0 deletions
22
scripts/update-types.sh
Executable file
22
scripts/update-types.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
set -e pipefail
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
|
||||
release=esr128 # TODO: Keep in sync with platform version once platform version >= esr128
|
||||
if [ -n "$1" ]; then
|
||||
tag=$1
|
||||
fi
|
||||
echo Downloading types from release $release
|
||||
|
||||
DIR_REMOTE="https://hg.mozilla.org/releases/mozilla-$release/raw-file/tip/tools/@types"
|
||||
DIR_LOCAL="$ROOT_DIR/types/gecko"
|
||||
|
||||
dir_listing=$(curl -fs "$DIR_REMOTE")
|
||||
filenames=$(cut -d ' ' -f 3 <<< "$dir_listing")
|
||||
for filename in $filenames; do
|
||||
curl -f "$DIR_REMOTE/$filename" > "$DIR_LOCAL/$filename"
|
||||
sed -i '' '/^\/\/\/ <reference no-default-lib="true" \/>/d' "$DIR_LOCAL/$filename"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue