zig-build-libxml2/update.sh
Mitchell Hashimoto 97da60311b
lower file size
2023-08-04 07:53:17 -07:00

21 lines
459 B
Bash
Executable File

#!/usr/bin/env bash
#
# Update the upstream to a specific commit. If this fails then it may leave
# your working tree in a bad state. You can recover by using Git to reset:
# git reset --hard HEAD.
set -e
ref=${1:-HEAD}
out=${2:-upstream}
rm -rf $out
git clone https://github.com/GNOME/libxml2.git $out
git -C $out checkout $ref
git -C $out rev-parse HEAD > ${out}.txt
rm -rf $out/.git
# Lower file size
rm -rf $out/doc
rm -rf $out/result
rm -rf $out/test