pushzshconfig 24.04.2013 22:51
This commit is contained in:
parent
1ce495196b
commit
b0f97ff89f
14
myzsh.sh
14
myzsh.sh
|
@ -21,16 +21,16 @@ timestamp=$(date +%s)
|
|||
if [ -r $ZSH/lastrun ];then
|
||||
lastrun=$(cat $ZSH/lastrun)
|
||||
if [ $((lastrun+604800)) -le $timestamp ]; then
|
||||
echo -e "do you want to update myzsh? [y/n] \c"
|
||||
read choice
|
||||
if [ $choice = "y" ]; then
|
||||
#echo -e "do you want to update myzsh? [y/n] \c"
|
||||
#read choice
|
||||
#if [ $choice = "y" ]; then
|
||||
echo "running update of myzsh now.."
|
||||
cd $ZSH; git pull origin master; cd -
|
||||
echo $timestamp > $ZSH/lastrun
|
||||
else
|
||||
# do not ask again for another day
|
||||
echo $((timestamp+86400)) > $ZSH/lastrun
|
||||
fi
|
||||
#else
|
||||
# # do not ask again for another day
|
||||
# echo $((timestamp+86400)) > $ZSH/lastrun
|
||||
#fi
|
||||
fi
|
||||
else
|
||||
echo $timestamp > $ZSH/lastrun
|
||||
|
|
Reference in New Issue