diff --git a/.rc.sh b/.rc.sh index f1e3783..6c4487f 100644 --- a/.rc.sh +++ b/.rc.sh @@ -8,6 +8,23 @@ export FLUTTER_STORAGE_BASE_URL=https://mirror.sjtu.edu.cn/ export CHROME_EXECUTABLE=/usr/bin/microsoft-edge-stable export PATH="$HOME/go/bin:$HOME/.local/flutter/bin:$HOME/.local/bin:$PATH" +function yupdate() { + cd $HOME + now=`date '+%s'` + if [ -e .check ]; then + before=`cat .check` + else + before=0 + fi + res=$((now-before)) + if [ $res -gt 3600 ]; then + echo "正在检查dotfiles是否更新" + echo $now > .check + yadm pull + fi +} +yupdate + function get_proxy() { if [ -e ~/.proxy ]; then cat ~/.proxy