mirror of
https://github.com/Kxsso/jcutmirror.git
synced 2026-02-09 01:16:58 +08:00
17 lines
635 B
Bash
17 lines
635 B
Bash
#!/bin/bash
|
|
|
|
md5sum yarn.lock || true
|
|
md5sum node_modules/yarn.lock || true
|
|
|
|
if cmp -s "yarn.lock" "node_modules/yarn.lock"; then
|
|
echo "yarn.lock did not change, skipping install"
|
|
else
|
|
echo "yarn.lock changed, reinstalling packages"
|
|
yarn config set registry https://mirrors.jcut.edu.cn/npm
|
|
yarn config set sharp_binary_host https://npmmirror.com/mirrors/sharp
|
|
yarn config set sharp_libvips_binary_host https://npmmirror.com/mirrors/sharp-libvips
|
|
yarn install --frozen-lockfile
|
|
sed -i 's/fonts.googleapis.com/fonts.loli.net/g' node_modules/gatsby-plugin-webfonts/modules/google.js
|
|
cp yarn.lock node_modules/yarn.lock
|
|
fi
|