auto update
This commit is contained in:
parent
fc03adf567
commit
f6fe3e4e25
17
.rc.sh
17
.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 CHROME_EXECUTABLE=/usr/bin/microsoft-edge-stable
|
||||||
export PATH="$HOME/go/bin:$HOME/.local/flutter/bin:$HOME/.local/bin:$PATH"
|
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() {
|
function get_proxy() {
|
||||||
if [ -e ~/.proxy ]; then
|
if [ -e ~/.proxy ]; then
|
||||||
cat ~/.proxy
|
cat ~/.proxy
|
||||||
|
Loading…
Reference in New Issue
Block a user